public void Lock(byte[] aPassphrase)
{
if (IsLocked) {
// can't lock if already locked
throw new AgentLockedException();
}
mLockedPassphrase = new SecureString();
if (aPassphrase != null) {
foreach (byte b in aPassphrase) {
mLockedPassphrase.AppendChar((char)b);
}
}
IsLocked = true;
FireLocked();
}