func (e *EncryptedMessage) Decrypt(provider CryptoProvider) (BankMessage, error) {
	decryptedMessageBytes, err := provider.Decrypt(e.EncryptedData.Data.Val())
	if err != nil {
		return nil, err
	}
	decryptedMessage, err := NewDecryptedMessage(e.MessageHeader(), e.MessageEnd(), decryptedMessageBytes)
	if err != nil {
		return nil, err
	}
	return decryptedMessage, nil
}
// Decrypt decrypts the message using the CryptoProvider
Decrypt decrypts the message using the CryptoProvider
// Decrypt decrypts the message using the CryptoProvider
func (e *EncryptedMessage) Decrypt(provider CryptoProvider) (BankMessage, error) {
	decryptedMessageBytes, err := provider.Decrypt(e.EncryptedData.Data.Val())
	if err != nil {
		return nil, err
	}
	decryptedMessage, err := NewDecryptedMessage(e.MessageHeader(), e.MessageEnd(), decryptedMessageBytes)
	if err != nil {
		return nil, err
	}
	return decryptedMessage, nil
}
func ( e * EncryptedMessage ) Decrypt ( provider CryptoProvider ) ( BankMessage , error ) { decryptedMessageBytes , err := provider . Decrypt ( e . EncryptedData . Data . Val ( ) ) if err != nil { return nil , err } decryptedMessage , err := NewDecryptedMessage ( e . MessageHeader ( ) , e . MessageEnd ( ) , decryptedMessageBytes ) if err != nil { return nil , err } return decryptedMessage , nil }
Decrypt decrypts the message using the CryptoProvider
Decrypt decrypts the message using the CryptoProvider