From d42b9e3df8d1bf0e2d0805a04663a79b22a2545d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 25 Nov 2019 19:06:05 +0100 Subject: crypto porting WIP --- src/crypto/nativeCrypto.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crypto/nativeCrypto.ts') 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) { -- cgit v1.2.3