コード例 #1
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            modulus         = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.MODULUS));
            publicExponent  = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.PUBLIC_EXPONENT));
            privateExponent = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.PRIVATE_EXPONENT));
            prime1          = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.PRIME_1));
            prime2          = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.PRIME_2));
            exponent1       = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.EXPONENT_1));
            exponent2       = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.EXPONENT_2));
            coefficient     = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.COEFFICIENT));
        }
コード例 #2
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            subject_ = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SUBJECT));

            id_ = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.ID));

            issuer_ = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.ISSUER));

            serialNumber_ = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SERIAL_NUMBER));

            value_ = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.VALUE));
        }
コード例 #3
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            subject            = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SUBJECT));
            sensitive          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SENSITIVE));
            decrypt            = ReadAttribute(session, HObj, new BooleanAttribute(CKA.DECRYPT));
            sign               = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SIGN));
            signRecover        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SIGN_RECOVER));
            unWrap             = ReadAttribute(session, HObj, new BooleanAttribute(CKA.UNWRAP));
            extractable        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.EXTRACTABLE));
            alwaysSensitive    = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ALWAYS_SENSITIVE));
            neverExtractable   = ReadAttribute(session, HObj, new BooleanAttribute(CKA.NEVER_EXTRACTABLE));
            wrapWithTrusted    = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP_WITH_TRUSTED));
            alwaysAuthenticate = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ALWAYS_AUTHENTICATE));
        }
コード例 #4
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            keyType = ReadAttribute(session, HObj, new KeyTypeAttribute());

            id = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.ID));

            startDate = ReadAttribute(session, HObj, new DateAttribute((uint)CKA.START_DATE));

            endDate = ReadAttribute(session, HObj, new DateAttribute((uint)CKA.END_DATE));

            derive = ReadAttribute(session, HObj, new BooleanAttribute(CKA.DERIVE));

            local = ReadAttribute(session, HObj, new BooleanAttribute(CKA.LOCAL));

            keyGenMechanism = ReadAttribute(session, HObj, new MechanismTypeAttribute(CKA.KEY_GEN_MECHANISM));
        }
コード例 #5
0
ファイル: SecretKey.cs プロジェクト: Ducis01/EidCardReader
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            subject    = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.SUBJECT));
            checkValue = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.CHECK_VALUE));

            this.sensitive        = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SENSITIVE));
            this.decrypt          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.DECRYPT));
            this.encrypt          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ENCRYPT));
            this.sign             = ReadAttribute(session, HObj, new BooleanAttribute(CKA.SIGN));
            this.verify           = ReadAttribute(session, HObj, new BooleanAttribute(CKA.VERIFY));
            this.wrap             = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP));
            this.unwrap           = ReadAttribute(session, HObj, new BooleanAttribute(CKA.UNWRAP));
            this.extractable      = ReadAttribute(session, HObj, new BooleanAttribute(CKA.EXTRACTABLE));
            this.alwaysSensitive  = ReadAttribute(session, HObj, new BooleanAttribute(CKA.ALWAYS_SENSITIVE));
            this.neverExtractable = ReadAttribute(session, HObj, new BooleanAttribute(CKA.NEVER_EXTRACTABLE));
            this.wrapWithTrusted  = ReadAttribute(session, HObj, new BooleanAttribute(CKA.WRAP_WITH_TRUSTED));
            this.trusted          = ReadAttribute(session, HObj, new BooleanAttribute(CKA.TRUSTED));
        }
コード例 #6
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            params_ = ReadAttribute(session, HObj, params_);
        }
コード例 #7
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            value_ = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.VALUE));
        }
コード例 #8
0
ファイル: P11Object.cs プロジェクト: Ducis01/EidCardReader
 public static ByteArrayAttribute ReadAttribute(Session session, uint hObj, ByteArrayAttribute attr)
 {
     return((ByteArrayAttribute)GetAttribute(session, hObj, attr));
 }
コード例 #9
0
        public override void ReadAttributes(Session session)
        {
            base.ReadAttributes(session);

            ecparams = ReadAttribute(session, HObj, new ByteArrayAttribute(CKA.EC_PARAMS));
        }