1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

spec recommends 11 random bytes for shared secret

This commit is contained in:
Bruno Windels
2020-03-31 16:05:27 +02:00
parent f97d413603
commit 275ea6aacb

View File

@@ -146,7 +146,7 @@ export class QRCodeData {
}
static _generateSharedSecret() {
const secretBytes = new Uint8Array(8);
const secretBytes = new Uint8Array(11);
global.crypto.getRandomValues(secretBytes);
this._sharedSecret = olmlib.encodeUnpaddedBase64(secretBytes);
}