Methods
-
openpgp_crypto_symmetricDecrypt(algo, key, data, openpgp_cfb) → {String}
-
Symmetrically decrypts data using a key with length depending on the algorithm in openpgp_cfb mode with or without resync (MDC style)
Parameters:
Name Type Description algo
Integer Algorithm to use (see RFC4880 9.2) key
String Key as string. length is depending on the algorithm used data
String Data to be decrypted openpgp_cfb
Boolean If true use the resync (for encrypteddata); otherwise use without the resync (for MDC encrypted data) - Source:
- openpgp.crypto.sym.js, line 67
Returns:
Plaintext data- Type
- String
-
openpgp_crypto_symmetricEncrypt(prefixrandom, algo, key, data, openpgp_cfb) → {String}
-
Symmetrically encrypts data using prefixedrandom, a key with length depending on the algorithm in openpgp_cfb mode with or without resync (MDC style)
Parameters:
Name Type Description prefixrandom
String Secure random bytes as string in length equal to the block size of the algorithm used (use openpgp_crypto_getPrefixRandom(algo) to retrieve that string algo
Integer Algorithm to use (see RFC4880 9.2) key
String Key as string. length is depending on the algorithm used data
String Data to encrypt openpgp_cfb
Boolean - Source:
- openpgp.crypto.sym.js, line 33
Returns:
Encrypted data- Type
- String