dlech.SshAgentLib.Agent.Lock C# (CSharp) Method

Lock() public method

public Lock ( byte aPassphrase ) : void
aPassphrase byte
return void
        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();
        }