use simple sign asym
This commit is contained in:
@ -100,7 +100,7 @@ func AsymDecryptArmored(PrivateKey string, data []byte) ([]byte, error) {
|
||||
return []byte(decrypted), err
|
||||
}
|
||||
|
||||
func AsymEncryptAndSign(PublicEncryptionKey string, PrivateSignatureKey string, data []byte) ([]byte, []byte, error) {
|
||||
func AsymEncryptAndSign_helpers(PublicEncryptionKey string, PrivateSignatureKey string, data []byte) ([]byte, []byte, error) {
|
||||
pub, err := base64.StdEncoding.DecodeString(PublicEncryptionKey)
|
||||
if err != nil {
|
||||
log.Error().Msg("Message encryption and sign b64 failed")
|
||||
@ -116,7 +116,7 @@ func AsymEncryptAndSign(PublicEncryptionKey string, PrivateSignatureKey string,
|
||||
return []byte(encrypted), []byte(signature), err
|
||||
}
|
||||
|
||||
func AsymDecryptAndCheck(MyPrivateEncryptionKey string, MyContactPublicKey string, data []byte, Signature []byte) (DecryptedMessage []byte, err error) {
|
||||
func AsymDecryptAndCheck_helpers(MyPrivateEncryptionKey string, MyContactPublicKey string, data []byte, Signature []byte) (DecryptedMessage []byte, err error) {
|
||||
priv, err := base64.StdEncoding.DecodeString(MyPrivateEncryptionKey)
|
||||
if err != nil {
|
||||
log.Error().Msg("Message decryption and sign b64 failed")
|
||||
@ -193,7 +193,7 @@ func createPublicKeyRing(publicKey string) (*crypto.KeyRing, error) {
|
||||
return publicKeyRing, nil
|
||||
}
|
||||
|
||||
func AsymEncryptAndSign2(PublicEncryptionKey string, PrivateSignatureKey string, data []byte) ([]byte, []byte, error) {
|
||||
func AsymEncryptAndSign(PublicEncryptionKey string, PrivateSignatureKey string, data []byte) ([]byte, []byte, error) {
|
||||
pub, err := base64.StdEncoding.DecodeString(PublicEncryptionKey)
|
||||
if err != nil {
|
||||
log.Error().Msg("Message encryption and sign b64 failed")
|
||||
@ -210,7 +210,7 @@ func AsymEncryptAndSign2(PublicEncryptionKey string, PrivateSignatureKey string,
|
||||
return ciphertext.GetBinary(), signature, err
|
||||
}
|
||||
|
||||
func AsymDecryptAndCheck2(MyPrivateEncryptionKey string, MyContactPublicKey string, data []byte, Signature []byte) (DecryptedMessage []byte, err error) {
|
||||
func AsymDecryptAndCheck(MyPrivateEncryptionKey string, MyContactPublicKey string, data []byte, Signature []byte) (DecryptedMessage []byte, err error) {
|
||||
priv, err := base64.StdEncoding.DecodeString(MyPrivateEncryptionKey)
|
||||
if err != nil {
|
||||
log.Error().Msg("Message decryption and sign b64 failed")
|
||||
|
Reference in New Issue
Block a user