8000 In certain special cases, `[hash:22]` may not meet expectations · Issue #5720 · rollup/rollup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
In certain special cases, [hash:22] may not meet expectations #5720
Closed
@shulaoda

Description

@shulaoda

Related to #5371

Due to the adoption of a new hash calculation method, the hash length is at most 21 in the following cases.

pub fn xxhash_base64_url(input: &[u8]) -> String {
to_string(&xxh3_128(input).to_le_bytes(), 64, CHARACTERS_BASE64).unwrap()
}

#[test]
fn test() {
  assert_eq!(xxhash_base64_url(b"0000").len(), 21);
  assert_eq!(to_string(b"1111111111111111", 64, CHARACTERS_BASE64).unwrap().len(), 21);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0