コード例 #1
0
ファイル: rinjdael.cs プロジェクト: bhargavaganti/hashing.cs
        public string rinjdael_decode(string cypher, string password)
        {
            string   salt = "1f Mi55in6 p@$$vv0rd";
            rinjdael h    = new rinjdael(password + salt);

            string decryptedstring;

            try
            {
                decryptedstring = h.decode(cypher);
            }
            catch (Exception)
            {
                decryptedstring = "Decoding error";
            }

            return(decryptedstring);
        }
コード例 #2
0
ファイル: rinjdael.cs プロジェクト: bhargavaganti/hashing.cs
        public string rinjdael_encode(string orignal, string password)
        {
            string   salt = "1f Mi55in6 p@$$vv0rd";
            rinjdael h    = new rinjdael(password + salt);

            string encryptedstring;

            try
            {
                encryptedstring = h.encode(orignal);
            }
            catch (Exception)
            {
                encryptedstring = "Encoding error";
            }

            return(encryptedstring);
        }