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:
parent
53a85837e0
commit
062cca9201
4 changed files with 268 additions and 76 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue