NServiceBus.WireEncryptedStringConversions.DecryptValue C# (CSharp) Method

DecryptValue() public static method

public static DecryptValue ( this encryptionService, WireEncryptedString wireEncryptedString, IIncomingLogicalMessageContext context ) : void
encryptionService this
wireEncryptedString WireEncryptedString
context IIncomingLogicalMessageContext
return void
        public static void DecryptValue(this IEncryptionService encryptionService, WireEncryptedString wireEncryptedString, IIncomingLogicalMessageContext context)
        {
            if (wireEncryptedString.EncryptedValue == null)
            {
                throw new Exception("Encrypted property is missing encryption data");
            }

            wireEncryptedString.Value = encryptionService.Decrypt(wireEncryptedString.EncryptedValue, context);
        }
    }
WireEncryptedStringConversions