Signcryption (#82)

* added signcryption in the helpers

* changed the name of encrypted signature

* changed the name of an encrypted signature

Co-authored-by: marin thiercelin <marin.thiercelin@pm.me>
This commit is contained in:
marinthiercelin 2020-10-07 15:26:36 +02:00 committed by GitHub
parent 2b8d58d357
commit ada3fd0533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 30 deletions

View file

@ -81,7 +81,7 @@ func GetJsonSHA256Fingerprints(publicKey string) ([]byte, error) {
}
type EncryptSignArmoredDetachedMobileResult struct {
Ciphertext, Signature string
Ciphertext, EncryptedSignature string
}
// EncryptSignArmoredDetachedMobile wraps the EncryptSignArmoredDetached method
@ -90,9 +90,9 @@ func EncryptSignArmoredDetachedMobile(
publicKey, privateKey string,
passphrase, plainData []byte,
) (wrappedTuple *EncryptSignArmoredDetachedMobileResult, err error) {
ciphertext, signature, err := encryptSignArmoredDetached(publicKey, privateKey, passphrase, plainData)
ciphertext, encryptedSignature, err := encryptSignArmoredDetached(publicKey, privateKey, passphrase, plainData)
if err != nil {
return nil, err
}
return &EncryptSignArmoredDetachedMobileResult{ciphertext, signature}, nil
return &EncryptSignArmoredDetachedMobileResult{ciphertext, encryptedSignature}, nil
}