public void FileEncrypt(string fileNameSrc, string fileNameDes) { string plainStr = reader.Read(fileNameSrc); string encryptedStr = cipher.Encrypt(plainStr); writer.Write(encryptedStr, fileNameDes); }
public void FileEncrypt(string srcfilepath, string desfilepath) { var plain = reader.Read(srcfilepath); var encrypt = cipher.Encrypt(plain); writer.Write(encrypt, desfilepath); }
public void FileEncrypt(string path) { string text1 = myFileReader.read(path); string text2 = mycCipherMachine.Encrypt(text1); myFileWrite.Write(path, text2); }
public override void EncryptFile(string filePath) { string text = _reader.Read(filePath); text = _cipherMachine.Encrypt(text); _writer.Write(Path.GetFileNameWithoutExtension(filePath) + "_encrypted.txt", text); Console.WriteLine("Encrypt successed. Encrypted Content:{0}", text); }
public override string DataEncrypt(string data) { return(cipher.Encrypt(data)); }