NServiceBus.StringConversions.EncryptValue C# (CSharp) Method

EncryptValue() public static method

public static EncryptValue ( this encryptionService, string &stringToEncrypt, IOutgoingLogicalMessageContext context ) : void
encryptionService this
stringToEncrypt string
context IOutgoingLogicalMessageContext
return void
        public static void EncryptValue(this IEncryptionService encryptionService, ref string stringToEncrypt, IOutgoingLogicalMessageContext context)
        {
            var encryptedValue = encryptionService.Encrypt(stringToEncrypt, context);

            stringToEncrypt = $"{encryptedValue.EncryptedBase64Value}@{encryptedValue.Base64Iv}";
        }