Net.Pkcs11Interop.HighLevelAPI81.Session.InitPin C# (CSharp) Method

InitPin() public method

Initializes the normal user's PIN
public InitPin ( byte userPin ) : void
userPin byte Pin value
return void
        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);
        }

Same methods

Session::InitPin ( string userPin ) : void