public void SymmetricAlgorithmsDecryptionMatchesWithSecureString(SymmetricAlgorithms enumValue)
        {
            string       toProcess       = "`~1234567890-=qwertyuiop[]\\ASDFGHJKL:\"ZXCVBNM<>?ăîșțâ";
            SecureString keySecureString = TestingHelper.StringToSecureString("{>@#F09\0");

            byte[] algorithmBytes = CryptographyHelper.EncryptData(enumValue, Encoding.Unicode.GetBytes(toProcess), Encoding.Unicode.GetBytes(TestingHelper.SecureStringToString(keySecureString)));

            DecryptText symmetricAlgorithm = new DecryptText
            {
                Algorithm = enumValue,
                Encoding  = new InArgument <Encoding>(ExpressionServices.Convert((env) => System.Text.Encoding.Unicode))
            };

            Dictionary <string, object> arguments = new Dictionary <string, object>();

            arguments.Add(nameof(DecryptText.Input), Convert.ToBase64String(algorithmBytes));
            arguments.Add(nameof(DecryptText.KeySecureString), keySecureString);

            WorkflowInvoker invoker        = new WorkflowInvoker(symmetricAlgorithm);
            string          activityString = (string)invoker.Invoke(arguments)[nameof(symmetricAlgorithm.Result)];

            Assert.Equal(toProcess, activityString);
        }
        public void KeyedHashAlgorithmsMatchWithSecureString(KeyedHashAlgorithms enumValue)
        {
            string       toHash          = "`~1234567890-=qwertyuiop[]\\ASDFGHJKL:\"ZXCVBNM<>?ăîșțâ";
            SecureString keySecureString = TestingHelper.StringToSecureString("{>@#F09\0");

            KeyedHashText keyedHash = new KeyedHashText
            {
                Algorithm = enumValue,
                Encoding  = new InArgument <Encoding>(ExpressionServices.Convert((env) => System.Text.Encoding.Unicode))
            };
            Dictionary <string, object> arguments = new Dictionary <string, object>();

            arguments.Add(nameof(KeyedHashText.Input), toHash);
            arguments.Add(nameof(KeyedHashText.KeySecureString), keySecureString);

            WorkflowInvoker invoker        = new WorkflowInvoker(keyedHash);
            string          activityString = (string)invoker.Invoke(arguments)[nameof(keyedHash.Result)];


            byte[] algorithmBytes = CryptographyHelper.HashDataWithKey(enumValue, Encoding.Unicode.GetBytes(toHash), Encoding.Unicode.GetBytes(TestingHelper.SecureStringToString(keySecureString)));

            Assert.Equal(activityString, BitConverter.ToString(algorithmBytes).Replace("-", string.Empty));
        }