public void InitPin(byte[] userPin)
{
if (this._disposed)
throw new ObjectDisposedException(this.GetType().FullName);
byte[] pinValue = null;
ulong pinValueLen = 0;
if (userPin != null)
{
pinValue = userPin;
pinValueLen = Convert.ToUInt64(userPin.Length);
}
CKR rv = _p11.C_InitPIN(_sessionId, pinValue, pinValueLen);
if (rv != CKR.CKR_OK)
throw new Pkcs11Exception("C_InitPIN", rv);
}