Initial commit

This commit is contained in:
talksik
2021-12-29 01:57:42 -08:00
commit ce39a60b42
4634 changed files with 997667 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
const Encrypt = require('./encrypt')
const decrypt = require('./decrypt')
const single = (serialization, cleartext, key, protectedHeader, aad, unprotectedHeader) => {
return new Encrypt(cleartext, protectedHeader, aad, unprotectedHeader)
.recipient(key)
.encrypt(serialization)
}
module.exports.Encrypt = Encrypt
module.exports.encrypt = single.bind(undefined, 'compact')
module.exports.encrypt.flattened = single.bind(undefined, 'flattened')
module.exports.encrypt.general = single.bind(undefined, 'general')
module.exports.decrypt = decrypt