| jwcrypto.sys.mjs |
Encrypts the given data into a JWE using AES-256-GCM content encryption.
This function implements a very small subset of the JWE encryption standard
from https://tools.ietf.org/html/rfc7516. The only supported content encryption
algorithm is enc="A256GCM" [1] and the only supported key encryption algorithm
is alg="ECDH-ES" [2].
@param {object} key Peer Public JWK.
@param {ArrayBuffer} data
[1] https://tools.ietf.org/html/rfc7518#section-5.3
[2] https://tools.ietf.org/html/rfc7518#section-4.6
@returns {Promise<string>}
|
7414 |
| utils.sys.mjs |
A number of `Legacy` suffixed functions are exposed by CryptoUtils.
They work with octet strings, which were used before Javascript
got ArrayBuffer and friends.
|
16411 |
| WeaveCrypto.sys.mjs |
_commonCrypt
@param {ArrayBuffer} data - data to encrypt/decrypt.
@param {string} symKeyStr - symmetric key (Base64 String).
@param {string} ivStr - initialization vector (Base64 String).
@param {number} operation - operation to apply (either OPERATIONS.ENCRYPT or OPERATIONS.DECRYPT)
@returns {ArrayBuffer}
The encrypted/decrypted data.
|
6357 |