gcm encryption

This commit is contained in:
Abhinav Adduri 2017-06-20 13:03:04 -07:00 committed by Danny Coates
parent a7fcb1a44f
commit 50995238bd
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
4 changed files with 30 additions and 32 deletions

View file

@ -12,7 +12,7 @@ function ivToStr(iv) {
}
function strToIv(str) {
const iv = new Uint8Array(16);
const iv = new Uint8Array(12);
for (let i = 0; i < str.length; i += 2) {
iv[i / 2] = parseInt(str.charAt(i) + str.charAt(i + 1), 16);
}