Exemplo n.º 1
0
        private static string EncryptImplementation(string source, string key, IEncrypt encryptor)
        {
            Debug.Assert(source != null, "source != null");
            Debug.Assert(source.Length > 0, "source cannot be empty");
            Debug.Assert(encryptor != null, "encryptor != null");
            Debug.Assert(key != null, "key != null");
            Debug.Assert(key.Length >= encryptor.MinimumPasswordLength, "key too short");

            return encryptor.EncryptAES(source, key);
        }