/// <summary> /// Decrypts the Data into a string /// </summary> /// <param name="locked">locked Data to be decrypted</param> public byte[] UnlockBytes(ILocked locked) { if (locked == null) { throw new ArgumentNullException(nameof(locked)); } return(SecretKeyBox_AES.Open(locked.Ciphertext, locked.Nonce, key)); }
/// <summary> /// Decrypts the Data into a string /// </summary> /// <param name="locked">locked Data to be decrypted</param> public string UnlockString(ILocked locked) { var tmp = UnlockBytes(locked); return(Secure.Encode(tmp)); }
public void AddLockedObject(ILocked item) { doors.Add(item); }