コード例 #1
0
        public void WriteEncrypted(string text, string path, byte[] key)
        {
            Cryptography cryptography = new Cryptography();

            Write(File.Exists(path) ? cryptography.Encrypt(cryptography.Decrypt(Read(path), key) + text + " ", key) : cryptography.Encrypt(text + " ", key), path, true);
        }
コード例 #2
0
        public string ReadEncrypted(string path, byte[] key)
        {
            Cryptography decrypter = new Cryptography();

            return(decrypter.Decrypt(Read(path), key));
        }