Почему в JavaScript у меня есть:
Buffer.from("32038ca6aa25db9377aaf54ac2de4059419205e4b9021b68a3b83039a5742b1f0d55cd39c3b8369373507963209c9676ac230d4724cb343b26a3cba4d6c84cae")
// Uint8Array(128) [51, 50, 48, 51, 56, 99, 97, 54, 97, 97, 50, 53, 100, 98, 57, 51, 55, 55, 97, 97, 102, 53, 52, 97, 99, 50, 100, 101, 52, 48, 53, 57, 52, 49, 57, 50, 48, 53, 101, 52, 98, 57, 48, 50, 49, 98, 54, 56, 97, 51, 98, 56, 51, 48, 51, 57, 97, 53, 55, 52, 50, 98, 49, 102, 48, 100, 53, 53, 99, 100, 51, 57, 99, 51, 98, 56, 51, 54, 57, 51, 55, 51, 53, 48, 55, 57, 54, 51, 50, 48, 57, 99, 57, 54, 55, 54, 97, 99, 50, 51, …]
Buffer.from("32038ca6aa25db9377aaf54ac2de4059419205e4b9021b68a3b83039a5742b1f0d55cd39c3b8369373507963209c9676ac230d4724cb343b26a3cba4d6c84cae", 'hex')
// Uint8Array(64) [50, 3, 140, 166, 170, 37, 219, 147, 119, 170, 245, 74, 194, 222, 64, 89, 65, 146, 5, 228, 185, 2, 27, 104, 163, 184, 48, 57, 165, 116, 43, 31, 13, 85, 205, 57, 195, 184, 54, 147, 115, 80, 121, 99, 32, 156, 150, 118, 172, 35, 13, 71, 36, 203, 52, 59, 38, 163, 203, 164, 214, 200, 76, 174]
Находясь в эликсире, я получаю:
iex(1)> "32038ca6aa25db9377aaf54ac2de4059419205e4b9021b68a3b83039a5742b1f0d55cd39c3b8369373507963209c9676ac230d4724cb343b26a3cba4d6c84cae" <> <<0>>
<<51, 50, 48, 51, 56, 99, 97, 54, 97, 97, 50, 53, 100, 98, 57, 51, 55, 55, 97, 97, 102, 53, 52, 97, 99, 50, 100, 101, 52, 48, 53, 57, 52, 49, 57, 50, 48, 53, 101, 52, 98, 57, 48, 50, 49, 98, 54, 56, 97, 51, ...>>
но:
iex(2)> Base.encode16("32038ca6aa25db9377aaf54ac2de4059419205e4b9021b68a3b83039a5742b1f0d55cd39c3b8369373507963209c9676ac230d4724cb343b26a3cba4d6c84cae") <> <<0>>
<<51, 51, 51, 50, 51, 48, 51, 51, 51, 56, 54, 51, 54, 49, 51, 54, 54, 49, 54, 49, 51, 50, 51, 53, 54, 52, 54, 50, 51, 57, 51, 51, 51, 55, 51, 55, 54, 49, 54, 49, 54, 54, 51, 53, 51, 52, 54, 49, 54, 51, ...>>