// internal AND protected internal void WritePassword(SecureString password) { if (_process == null) { return; } if (!password.IsReadOnly()) { throw new GpgApiException("The SecureString \"password\" must be readonly"); } using (SecureStringToCharArrayMarshaler m = new SecureStringToCharArrayMarshaler(password)) { _process.StandardInput.Write(m.Value); _process.StandardInput.WriteLine(); } }
// internal AND protected internal void WritePassword(SecureString password) { if (_process == null) return; if (!password.IsReadOnly()) throw new GpgApiException("The SecureString \"password\" must be readonly"); using (SecureStringToCharArrayMarshaler m = new SecureStringToCharArrayMarshaler(password)) { _process.StandardInput.Write(m.Value); _process.StandardInput.WriteLine(); } }