diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-11-25 19:06:05 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-11-25 19:06:05 +0100 |
commit | d42b9e3df8d1bf0e2d0805a04663a79b22a2545d (patch) | |
tree | b49d41ff97b313c951d332975fb34ecc263d7383 /src/crypto/nativeCrypto.ts | |
parent | de9f8867d5141940f47951c51648becec74959cb (diff) |
crypto porting WIP
Diffstat (limited to 'src/crypto/nativeCrypto.ts')
-rw-r--r-- | src/crypto/nativeCrypto.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/nativeCrypto.ts b/src/crypto/nativeCrypto.ts index 853ece6c7..306d22009 100644 --- a/src/crypto/nativeCrypto.ts +++ b/src/crypto/nativeCrypto.ts @@ -110,13 +110,13 @@ export function encodeCrock(data: ArrayBuffer): string { return sb; } -export function decodeCrock(encoded: string): ArrayBuffer { +export function decodeCrock(encoded: string): Uint8Array { const size = encoded.length; let bitpos = 0; let bitbuf = 0; let readPosition = 0; const outLen = Math.floor((size * 5) / 8); - const out = new Int8Array(outLen); + const out = new Uint8Array(outLen); let outPos = 0; while (readPosition < size || bitpos > 0) { |