Class: PKCS11::Luna::CK_ATTRIBUTE

Inherits:
CK_ATTRIBUTE
  • Object
show all
Defined in:
lib/pkcs11_luna/extensions.rb

Overview

Derive CK_ATTRIBUTE to get converted attributes.

Constant Summary collapse

ATTRIBUTES =
{
  CKA_CCM_PRIVATE => :bool,
  CKA_X9_31_GENERATED => :bool,
  CKA_USAGE_COUNT => :ulong,
  CKA_USAGE_LIMIT => :ulong
}

Instance Method Summary collapse

Instance Method Details

#valueObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/pkcs11_luna/extensions.rb', line 15

def value
  case ATTRIBUTES[type]
    when :bool
      super != "\0"
    when :ulong
      super.unpack("L!")[0]
    else
      super
  end
end