ClrPlus.Core.Extensions.StringExtensions.UnprotectForUser C# (CSharp) Method

UnprotectForUser() public static method

decrypts the given collection of bytes with the user key and salt (defaults to "CoAppToolkit") and returns a string from the UTF8 representation of the bytes. returns an empty string on failure
public static UnprotectForUser ( this binaryData, string salt = "CoAppToolkit" ) : string
binaryData this The binary data.
salt string The salt.
return string
        public static string UnprotectForUser(this IEnumerable<byte> binaryData, string salt = "CoAppToolkit") {
            var data = binaryData.UnprotectBinaryForUser(salt);
            return data.Any() ? data.ToUtf8String() : String.Empty;
        }