1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

org user invites and confirmation

This commit is contained in:
Kyle Spearrin
2017-03-04 20:41:45 -05:00
parent b36799bf0c
commit a9e85f8765
9 changed files with 170 additions and 6 deletions

View File

@@ -190,6 +190,11 @@ angular
throw 'Public key unavailable.';
}
if (typeof publicKey === 'string') {
var publicKeyBytes = forge.util.decode64(publicKey);
publicKey = forge.pki.publicKeyFromAsn1(forge.asn1.fromDer(publicKeyBytes));
}
var encryptedBytes = publicKey.encrypt(plainValue, 'RSA-OAEP', {
md: forge.md.sha256.create()
});