Added helpers with encrypted signatures and unarmored binary ciphertexts (#83)

* added signcryption for binary ciphertexts

* fixing merge issues

* removed newlines before error handling

Co-authored-by: marin thiercelin <marin.thiercelin@pm.me>
This commit is contained in:
marinthiercelin 2020-10-29 06:20:39 -07:00 committed by GitHub
parent 53a85837e0
commit 062cca9201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 268 additions and 76 deletions

View file

@ -55,6 +55,16 @@ func EncryptSignAttachment(
func EncryptSignArmoredDetached(
publicKey, privateKey string,
passphrase, plainData []byte,
) (ciphertext, encryptedSignature string, err error) {
) (ciphertextArmored, encryptedSignatureArmored string, err error) {
return encryptSignArmoredDetached(publicKey, privateKey, passphrase, plainData)
}
// EncryptSignBinaryDetached takes a public key for encryption,
// a private key and its passphrase for signature, and the plaintext data
// Returns encrypted binary data and a detached armored encrypted signature.
func EncryptSignBinaryDetached(
publicKey, privateKey string,
passphrase, plainData []byte,
) (encryptedData []byte, encryptedSignatureArmored string, err error) {
return encryptSignBinaryDetached(publicKey, privateKey, passphrase, plainData)
}