From 12b578d44cc4796851003496ac676aa285346a7f Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sat, 30 Dec 2017 15:11:32 +0000 Subject: [PATCH] UserInfo: Fix the HMAC calculation function. --- src/api/EteSync.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/EteSync.ts b/src/api/EteSync.ts index cc6530b..dd57acc 100644 --- a/src/api/EteSync.ts +++ b/src/api/EteSync.ts @@ -276,7 +276,7 @@ export class UserInfo extends BaseItem { } calculateHmac(cryptoManager: CryptoManager, encrypted: byte[]): byte[] { - let postfix = stringToByteArray(this._json.pubkey); + let postfix = sjcl.codec.bytes.fromBits(sjcl.codec.base64.toBits(this._json.pubkey)); return cryptoManager.hmac(encrypted.concat(postfix)); }