mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 22:05:40 +00:00
Bug 617868 follow-up: fix test
This commit is contained in:
parent
0e226c056e
commit
dca3c0bc83
@ -43,11 +43,12 @@ function test_keymanager() {
|
||||
// Decode the key here to mirror what generateEntry will do,
|
||||
// but pass it encoded into the KeyBundle call below.
|
||||
|
||||
let sha256inputE = Utils.makeHMACKey("" + HMAC_INPUT + username + "\x01");
|
||||
let encryptKey = Utils.sha256HMACBytes(Utils.decodeKeyBase32(testKey), sha256inputE);
|
||||
let sha256inputE = "" + HMAC_INPUT + username + "\x01";
|
||||
let key = Utils.makeHMACKey(Utils.decodeKeyBase32(testKey));
|
||||
let encryptKey = Utils.sha256HMACBytes(sha256inputE, key);
|
||||
|
||||
let sha256inputH = Utils.makeHMACKey(encryptKey + HMAC_INPUT + username + "\x02");
|
||||
let hmacKey = Utils.sha256HMACBytes(Utils.decodeKeyBase32(testKey), sha256inputH);
|
||||
let sha256inputH = encryptKey + HMAC_INPUT + username + "\x02";
|
||||
let hmacKey = Utils.sha256HMACBytes(sha256inputH, key);
|
||||
|
||||
// Encryption key is stored in base64 for WeaveCrypto convenience.
|
||||
do_check_eq(btoa(encryptKey), new SyncKeyBundle(null, username, testKey).encryptionKey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user