Esempio n. 1
0
        public string TwoFishDecryption(string cipher, string key)
        {
            BCEngine bcEngine = new BCEngine(new TwofishEngine(), Encoding.ASCII);

            bcEngine.SetPadding(new Pkcs7Padding());
            return(bcEngine.Decrypt(cipher, key));
        }
Esempio n. 2
0
        public string TwoFishEncryption(string plain, string key)
        {
            BCEngine bcEngine = new BCEngine(new TwofishEngine(), Encoding.ASCII);

            bcEngine.SetPadding(new Pkcs7Padding());
            return(bcEngine.Encrypt(plain, key));
        }