public void LiftFileDefenseRecovery() { FileSecurity.EncryptWalletFile(_wallet, _key, _recoverypath); FileSecurity.LiftFileDefense(_recoverypath); FileAttributes attributes = File.GetAttributes(_recoverypath); Assert.AreEqual(FileAttributes.Normal, attributes); }
public void ApplyFileDefenseRecovery() { FileSecurity.EncryptWalletFile(_wallet, _key, _recoverypath); FileSecurity.ApplyFileDefense(_recoverypath); Assert.True(File.Exists(_recoverypath)); FileAttributes attributes = File.GetAttributes(_recoverypath); Assert.AreEqual(FileAttributes.Hidden | FileAttributes.ReadOnly, attributes); }
public void EncryptWalletFail() { string badKey = "238085A3C30982B6DBE1"; Assert.Throws <CryptographicException>(() => FileSecurity.EncryptWalletFile(_wallet, badKey, _path)); }
public void EncryptWallet() { Assert.DoesNotThrow(() => FileSecurity.EncryptWalletFile(_wallet, _key, _path)); }