dankogai/js-base64

U8s input and output are inconsistent

moxiaolongx0 opened this issue · 1 comments

let u8s = new Uint8Array([96,-28,-67,-96,-27,-91,-67]);
undefined
Base64.fromUint8Array(u8s);
"YOS9oOWlvQ=="
Base64.toUint8Array("YOS9oOWlvQ==");
Uint8Array(7) [96, 228, 189, 160, 229, 165, 189]

No. inconsistent is you feeding NEGATIVE VALUE.
Uint8Array stands for An array of UInt8.
Uint8 stands for UNSIGNED 8bit integer.
UNSIGNED.
console