Skip to content

Commit 0f4676d

Browse files
authored
Use a less surprising base-16 encoding (#5719)
While not important to many, this makes it possible to recreate hashes.
1 parent b350d9e commit 0f4676d

21 files changed

+21
-21
lines changed

rust/xxhash/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const CHARACTERS_BASE64: &[u8; 64] =
66

77
const CHARACTERS_BASE36: &[u8; 36] = b"abcdefghijklmnopqrstuvwxyz0123456789";
88

9-
const CHARACTERS_BASE16: &[u8; 16] = b"abcdef0123456789";
9+
const CHARACTERS_BASE16: &[u8; 16] = b"0123456789abcdef";
1010

1111
pub fn xxhash_base64_url(input: &[u8]) -> String {
1212
to_string(&xxh3_128(input).to_le_bytes(), 64, CHARACTERS_BASE64).unwrap()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
define(['./dep-9748f597e7f841'], (function (dep) { 'use strict';
2+
3+
console.log('main1');
4+
5+
}));

test/chunking-form/samples/hashing/base-16/_expected/amd/main1-c7c1549b.js

-5
This file was deleted.

test/chunking-form/samples/hashing/base-16/_expected/amd/main2-b28d1351.js

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
define(['./dep-9748f597e7f841'], (function (dep) { 'use strict';
2+
3+
console.log('main2');
4+
5+
}));
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

3-
require('./dep-56610f0f1f4a63.js');
3+
require('./dep-8e72f6a548dc1a.js');
44

55
console.log('main1');
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

3-
require('./dep-56610f0f1f4a63.js');
3+
require('./dep-8e72f6a548dc1a.js');
44

55
console.log('main2');

test/chunking-form/samples/hashing/base-16/_expected/es/main1-2ba5365c.js

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import './dep-ea4271148a0859.js';
2+
3+
console.log('main1');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import './dep-ea4271148a0859.js';
2+
3+
console.log('main2');

test/chunking-form/samples/hashing/base-16/_expected/es/main2-c2fcf802.js

-3
This file was deleted.

test/chunking-form/samples/hashing/base-16/_expected/system/main1-0b232646.js test/chunking-form/samples/hashing/base-16/_expected/system/main1-9428b54c.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
System.register(['./dep-bacfaa81397007.js'], (function () {
1+
System.register(['./dep-fc1ce55215e47e.js'], (function () {
22
'use strict';
33
return {
44
setters: [null],

test/chunking-form/samples/hashing/base-16/_expected/system/main2-83b1318a.js test/chunking-form/samples/hashing/base-16/_expected/system/main2-bae4f47a.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
System.register(['./dep-bacfaa81397007.js'], (function () {
1+
System.register(['./dep-fc1ce55215e47e.js'], (function () {
22
'use strict';
33
return {
44
setters: [null],

0 commit comments

Comments
 (0)