Example #1
0
        public List <string> decrypt()
        {
            List <string> output = new List <string>();

            if (path != null && pass != null && keyHash != null)
            {
                try {
                    output = EncryptionWrapper.decryptFromFile(path, pass, keyHash);
                }
                catch {}
            }
            return(output);
        }
Example #2
0
        public bool encrypt(List <string> input)
        {
            if (path == null || pass == null)
            {
                return(false);
            }

            try {
                (keyHash, salt, intHash) = EncryptionWrapper.preparePassword(pass);
                EncryptionWrapper.encryptToFile(path, input, keyHash, salt, intHash);
            }
            catch {
                return(false);
            }
            return(true);
        }