mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 22:03:50 +02:00
fix: AES key generation out of bounds (#1596)
This commit is contained in:
@@ -14,7 +14,7 @@ const uint8ArrayToHex = (arr) =>
|
||||
function stdAESKey(key) {
|
||||
const tKey = new TextEncoder().encode(key);
|
||||
let sk = tKey;
|
||||
if (key.length < 32) {
|
||||
if (tKey.length < 32) {
|
||||
sk = new Uint8Array(32);
|
||||
sk.set(tKey);
|
||||
sk.set(defaultAESKey.slice(key.length, 32), key.length);
|
||||
|
||||
Reference in New Issue
Block a user