aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/nativeCrypto.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-11-25 19:06:05 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-11-25 19:06:05 +0100
commitd42b9e3df8d1bf0e2d0805a04663a79b22a2545d (patch)
treeb49d41ff97b313c951d332975fb34ecc263d7383 /src/crypto/nativeCrypto.ts
parentde9f8867d5141940f47951c51648becec74959cb (diff)
crypto porting WIP
Diffstat (limited to 'src/crypto/nativeCrypto.ts')
-rw-r--r--src/crypto/nativeCrypto.ts4
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) {