pkcs11 0.2.6 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ext/pk11.h CHANGED
@@ -1,28 +1,13 @@
1
1
  #ifndef RUBY_PK11_H
2
2
  #define RUBY_PK11_H
3
3
  #include <ruby.h>
4
+ #include <ruby/thread.h>
5
+ #include <ruby/encoding.h>
4
6
 
5
7
  #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
6
8
  #define compile_for_windows
7
9
  #endif
8
10
 
9
- #if !defined(RARRAY_LEN)
10
- # define RARRAY_LEN(ary) (RARRAY(ary)->len)
11
- #endif
12
- #if !defined(RSTRING_LEN)
13
- # define RSTRING_LEN(str) (RSTRING(str)->len)
14
- #endif
15
- #if !defined(RSTRING_PTR)
16
- # define RSTRING_PTR(str) (RSTRING(str)->ptr)
17
- #endif
18
-
19
- #ifndef HAVE_RB_STR_SET_LEN
20
- #define rb_str_set_len(str, length) do { \
21
- RSTRING(str)->ptr[length] = 0; \
22
- RSTRING(str)->len = length; \
23
- } while(0)
24
- #endif
25
-
26
11
  void Init_pkcs11_ext();
27
12
  void Init_pkcs11_const(VALUE, VALUE);
28
13
 
@@ -170,14 +170,15 @@ Init_pkcs11_const(VALUE cPKCS11, VALUE ePKCS11Error)
170
170
  PKCS11_DEFINE_CONST(CKZ_DATA_SPECIFIED);
171
171
  PKCS11_DEFINE_CONST(CKZ_SALT_SPECIFIED);
172
172
 
173
- vOBJECT_CLASSES = rb_hash_new();
174
- vATTRIBUTES = rb_hash_new();
175
- vMECHANISMS = rb_hash_new();
176
- vRETURN_VALUES = rb_hash_new();
177
- rb_define_const(cPKCS11, "OBJECT_CLASSES", vOBJECT_CLASSES);
178
- rb_define_const(cPKCS11, "ATTRIBUTES", vATTRIBUTES);
179
- rb_define_const(cPKCS11, "MECHANISMS", vMECHANISMS);
180
- rb_define_const(cPKCS11, "RETURN_VALUES", vRETURN_VALUES);
173
+ #define DEFINE_GLOBAL_HASH(h) \
174
+ rb_global_variable(&v##h); \
175
+ v##h = rb_hash_new(); \
176
+ rb_define_const(cPKCS11, #h, v##h);
177
+
178
+ DEFINE_GLOBAL_HASH(OBJECT_CLASSES)
179
+ DEFINE_GLOBAL_HASH(ATTRIBUTES)
180
+ DEFINE_GLOBAL_HASH(MECHANISMS)
181
+ DEFINE_GLOBAL_HASH(RETURN_VALUES)
181
182
 
182
183
  #include "pk11_const_def.inc"
183
184
 
@@ -6,7 +6,7 @@
6
6
  /**************************************************/
7
7
 
8
8
  #define PKCS11_DEFINE_CONST(constant) \
9
- rb_define_const(MODULE_FOR_CONSTS, #constant, INT2NUM(constant))
9
+ rb_define_const(MODULE_FOR_CONSTS, #constant, LONG2NUM(constant))
10
10
 
11
11
  #define PKCS11_DEFINE_CONST_GROUP(group, name, value) \
12
12
  do { \
@@ -17,6 +17,7 @@
17
17
  old = rb_hash_aref(group, rvalue); \
18
18
  if (!NIL_P(old)) rb_warning("%s is equal to %s", RSTRING_PTR(old), name); \
19
19
  rb_hash_aset(group, rvalue, str); \
20
+ RB_GC_GUARD(str); \
20
21
  } while(0)
21
22
 
22
23
  #define PKCS11_DEFINE_OBJECT_CLASS(constant) \
@@ -19,11 +19,11 @@ def to_s; end
19
19
  def members; end
20
20
  # @return [PKCS11::CK_VERSION] inline struct
21
21
  attr_accessor :cryptokiVersion
22
- # @return [String] accessor for manufacturerID (max 32 bytes)
22
+ # @return [UTF8-String] accessor for manufacturerID (max 32 bytes)
23
23
  attr_accessor :manufacturerID
24
24
  # @return [Integer] accessor for flags (CK_ULONG)
25
25
  attr_accessor :flags
26
- # @return [String] accessor for libraryDescription (max 32 bytes)
26
+ # @return [UTF8-String] accessor for libraryDescription (max 32 bytes)
27
27
  attr_accessor :libraryDescription
28
28
  # @return [PKCS11::CK_VERSION] inline struct
29
29
  attr_accessor :libraryVersion
@@ -35,9 +35,9 @@ SIZEOF_STRUCT=Integer
35
35
  def to_s; end
36
36
  # @return [Array<String>] Attributes of this struct
37
37
  def members; end
38
- # @return [String] accessor for slotDescription (max 64 bytes)
38
+ # @return [UTF8-String] accessor for slotDescription (max 64 bytes)
39
39
  attr_accessor :slotDescription
40
- # @return [String] accessor for manufacturerID (max 32 bytes)
40
+ # @return [UTF8-String] accessor for manufacturerID (max 32 bytes)
41
41
  attr_accessor :manufacturerID
42
42
  # @return [Integer] accessor for flags (CK_ULONG)
43
43
  attr_accessor :flags
@@ -53,13 +53,13 @@ SIZEOF_STRUCT=Integer
53
53
  def to_s; end
54
54
  # @return [Array<String>] Attributes of this struct
55
55
  def members; end
56
- # @return [String] accessor for label (max 32 bytes)
56
+ # @return [UTF8-String] accessor for label (max 32 bytes)
57
57
  attr_accessor :label
58
- # @return [String] accessor for manufacturerID (max 32 bytes)
58
+ # @return [UTF8-String] accessor for manufacturerID (max 32 bytes)
59
59
  attr_accessor :manufacturerID
60
- # @return [String] accessor for model (max 16 bytes)
60
+ # @return [UTF8-String] accessor for model (max 16 bytes)
61
61
  attr_accessor :model
62
- # @return [String] accessor for serialNumber (max 16 bytes)
62
+ # @return [USASCII-String] accessor for serialNumber (max 16 bytes)
63
63
  attr_accessor :serialNumber
64
64
  # @return [Integer] accessor for flags (CK_ULONG)
65
65
  attr_accessor :flags
@@ -87,7 +87,7 @@ attr_accessor :ulFreePrivateMemory
87
87
  attr_accessor :hardwareVersion
88
88
  # @return [PKCS11::CK_VERSION] inline struct
89
89
  attr_accessor :firmwareVersion
90
- # @return [String] accessor for utcTime (max 16 bytes)
90
+ # @return [USASCII-String] accessor for utcTime (max 16 bytes)
91
91
  attr_accessor :utcTime
92
92
  end
93
93
  class PKCS11::CK_SESSION_INFO < PKCS11::CStruct
@@ -113,11 +113,11 @@ SIZEOF_STRUCT=Integer
113
113
  def to_s; end
114
114
  # @return [Array<String>] Attributes of this struct
115
115
  def members; end
116
- # @return [String] accessor for year (max 4 bytes)
116
+ # @return [USASCII-String] accessor for year (max 4 bytes)
117
117
  attr_accessor :year
118
- # @return [String] accessor for month (max 2 bytes)
118
+ # @return [USASCII-String] accessor for month (max 2 bytes)
119
119
  attr_accessor :month
120
- # @return [String] accessor for day (max 2 bytes)
120
+ # @return [USASCII-String] accessor for day (max 2 bytes)
121
121
  attr_accessor :day
122
122
  end
123
123
  class PKCS11::CK_MECHANISM_INFO < PKCS11::CStruct
@@ -141,7 +141,7 @@ SIZEOF_STRUCT=Integer
141
141
  def to_s; end
142
142
  # @return [Array<String>] Attributes of this struct
143
143
  def members; end
144
- # @return [String, nil] accessor for pReserved
144
+ # @return [ASCII8BIT-String, nil] accessor for pReserved
145
145
  attr_accessor :pReserved
146
146
  # @return [Integer] accessor for flags (CK_ULONG)
147
147
  attr_accessor :flags
@@ -153,7 +153,7 @@ SIZEOF_STRUCT=Integer
153
153
  def to_s; end
154
154
  # @return [Array<String>] Attributes of this struct
155
155
  def members; end
156
- # @return [String, nil] accessor for pSourceData and ulSourceDataLen
156
+ # @return [ASCII8BIT-String, nil] accessor for pSourceData and ulSourceDataLen
157
157
  attr_accessor :pSourceData
158
158
  # @return [Integer] accessor for hashAlg (CK_ULONG)
159
159
  attr_accessor :hashAlg
@@ -183,9 +183,9 @@ SIZEOF_STRUCT=Integer
183
183
  def to_s; end
184
184
  # @return [Array<String>] Attributes of this struct
185
185
  def members; end
186
- # @return [String, nil] accessor for pSharedData and ulSharedDataLen
186
+ # @return [ASCII8BIT-String, nil] accessor for pSharedData and ulSharedDataLen
187
187
  attr_accessor :pSharedData
188
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
188
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
189
189
  attr_accessor :pPublicData
190
190
  # @return [Integer] accessor for kdf (CK_ULONG)
191
191
  attr_accessor :kdf
@@ -197,11 +197,11 @@ SIZEOF_STRUCT=Integer
197
197
  def to_s; end
198
198
  # @return [Array<String>] Attributes of this struct
199
199
  def members; end
200
- # @return [String, nil] accessor for pSharedData and ulSharedDataLen
200
+ # @return [ASCII8BIT-String, nil] accessor for pSharedData and ulSharedDataLen
201
201
  attr_accessor :pSharedData
202
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
202
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
203
203
  attr_accessor :pPublicData
204
- # @return [String, nil] accessor for pPublicData2
204
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData2
205
205
  attr_accessor :pPublicData2
206
206
  # @return [Integer] accessor for kdf (CK_ULONG)
207
207
  attr_accessor :kdf
@@ -221,9 +221,9 @@ SIZEOF_STRUCT=Integer
221
221
  def to_s; end
222
222
  # @return [Array<String>] Attributes of this struct
223
223
  def members; end
224
- # @return [String, nil] accessor for pOtherInfo and ulOtherInfoLen
224
+ # @return [ASCII8BIT-String, nil] accessor for pOtherInfo and ulOtherInfoLen
225
225
  attr_accessor :pOtherInfo
226
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
226
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
227
227
  attr_accessor :pPublicData
228
228
  # @return [Integer] accessor for kdf (CK_ULONG)
229
229
  attr_accessor :kdf
@@ -235,11 +235,11 @@ SIZEOF_STRUCT=Integer
235
235
  def to_s; end
236
236
  # @return [Array<String>] Attributes of this struct
237
237
  def members; end
238
- # @return [String, nil] accessor for pOtherInfo and ulOtherInfoLen
238
+ # @return [ASCII8BIT-String, nil] accessor for pOtherInfo and ulOtherInfoLen
239
239
  attr_accessor :pOtherInfo
240
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
240
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
241
241
  attr_accessor :pPublicData
242
- # @return [String, nil] accessor for pPublicData2
242
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData2
243
243
  attr_accessor :pPublicData2
244
244
  # @return [Integer] accessor for kdf (CK_ULONG)
245
245
  attr_accessor :kdf
@@ -257,11 +257,11 @@ SIZEOF_STRUCT=Integer
257
257
  def to_s; end
258
258
  # @return [Array<String>] Attributes of this struct
259
259
  def members; end
260
- # @return [String, nil] accessor for pOtherInfo and ulOtherInfoLen
260
+ # @return [ASCII8BIT-String, nil] accessor for pOtherInfo and ulOtherInfoLen
261
261
  attr_accessor :pOtherInfo
262
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
262
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
263
263
  attr_accessor :pPublicData
264
- # @return [String, nil] accessor for pPublicData2
264
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData2
265
265
  attr_accessor :pPublicData2
266
266
  # @return [Integer] accessor for kdf (CK_ULONG)
267
267
  attr_accessor :kdf
@@ -281,11 +281,11 @@ SIZEOF_STRUCT=Integer
281
281
  def to_s; end
282
282
  # @return [Array<String>] Attributes of this struct
283
283
  def members; end
284
- # @return [String, nil] accessor for pRandomA
284
+ # @return [ASCII8BIT-String, nil] accessor for pRandomA
285
285
  attr_accessor :pRandomA
286
- # @return [String, nil] accessor for pRandomB
286
+ # @return [ASCII8BIT-String, nil] accessor for pRandomB
287
287
  attr_accessor :pRandomB
288
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
288
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
289
289
  attr_accessor :pPublicData
290
290
  # @return [Boolean] Bool value
291
291
  attr_accessor :isSender
@@ -301,7 +301,7 @@ def to_s; end
301
301
  def members; end
302
302
  # @return [Integer] accessor for ulEffectiveBits (CK_ULONG)
303
303
  attr_accessor :ulEffectiveBits
304
- # @return [String] accessor for iv (max 8 bytes)
304
+ # @return [ASCII8BIT-String] accessor for iv (max 8 bytes)
305
305
  attr_accessor :iv
306
306
  end
307
307
  class PKCS11::CK_RC2_MAC_GENERAL_PARAMS < PKCS11::CStruct
@@ -335,7 +335,7 @@ SIZEOF_STRUCT=Integer
335
335
  def to_s; end
336
336
  # @return [Array<String>] Attributes of this struct
337
337
  def members; end
338
- # @return [String, nil] accessor for pIv and ulIvLen
338
+ # @return [ASCII8BIT-String, nil] accessor for pIv and ulIvLen
339
339
  attr_accessor :pIv
340
340
  # @return [Integer] accessor for ulWordsize (CK_ULONG)
341
341
  attr_accessor :ulWordsize
@@ -363,9 +363,9 @@ SIZEOF_STRUCT=Integer
363
363
  def to_s; end
364
364
  # @return [Array<String>] Attributes of this struct
365
365
  def members; end
366
- # @return [String, nil] accessor for pData and length
366
+ # @return [ASCII8BIT-String, nil] accessor for pData and length
367
367
  attr_accessor :pData
368
- # @return [String] accessor for iv (max 8 bytes)
368
+ # @return [ASCII8BIT-String] accessor for iv (max 8 bytes)
369
369
  attr_accessor :iv
370
370
  end
371
371
  class PKCS11::CK_AES_CBC_ENCRYPT_DATA_PARAMS < PKCS11::CStruct
@@ -375,9 +375,9 @@ SIZEOF_STRUCT=Integer
375
375
  def to_s; end
376
376
  # @return [Array<String>] Attributes of this struct
377
377
  def members; end
378
- # @return [String, nil] accessor for pData and length
378
+ # @return [ASCII8BIT-String, nil] accessor for pData and length
379
379
  attr_accessor :pData
380
- # @return [String] accessor for iv (max 16 bytes)
380
+ # @return [ASCII8BIT-String] accessor for iv (max 16 bytes)
381
381
  attr_accessor :iv
382
382
  end
383
383
  class PKCS11::CK_SKIPJACK_PRIVATE_WRAP_PARAMS < PKCS11::CStruct
@@ -387,17 +387,17 @@ SIZEOF_STRUCT=Integer
387
387
  def to_s; end
388
388
  # @return [Array<String>] Attributes of this struct
389
389
  def members; end
390
- # @return [String, nil] accessor for pPassword and ulPasswordLen
390
+ # @return [ASCII8BIT-String, nil] accessor for pPassword and ulPasswordLen
391
391
  attr_accessor :pPassword
392
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
392
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
393
393
  attr_accessor :pPublicData
394
- # @return [String, nil] accessor for pRandomA
394
+ # @return [ASCII8BIT-String, nil] accessor for pRandomA
395
395
  attr_accessor :pRandomA
396
- # @return [String, nil] accessor for pPrimeP
396
+ # @return [ASCII8BIT-String, nil] accessor for pPrimeP
397
397
  attr_accessor :pPrimeP
398
- # @return [String, nil] accessor for pBaseG
398
+ # @return [ASCII8BIT-String, nil] accessor for pBaseG
399
399
  attr_accessor :pBaseG
400
- # @return [String, nil] accessor for pSubprimeQ
400
+ # @return [ASCII8BIT-String, nil] accessor for pSubprimeQ
401
401
  attr_accessor :pSubprimeQ
402
402
  # @return [Integer] accessor for ulPAndGLen (CK_ULONG)
403
403
  attr_accessor :ulPAndGLen
@@ -413,19 +413,19 @@ SIZEOF_STRUCT=Integer
413
413
  def to_s; end
414
414
  # @return [Array<String>] Attributes of this struct
415
415
  def members; end
416
- # @return [String, nil] accessor for pOldWrappedX and ulOldWrappedXLen
416
+ # @return [ASCII8BIT-String, nil] accessor for pOldWrappedX and ulOldWrappedXLen
417
417
  attr_accessor :pOldWrappedX
418
- # @return [String, nil] accessor for pOldPassword and ulOldPasswordLen
418
+ # @return [ASCII8BIT-String, nil] accessor for pOldPassword and ulOldPasswordLen
419
419
  attr_accessor :pOldPassword
420
- # @return [String, nil] accessor for pOldPublicData and ulOldPublicDataLen
420
+ # @return [ASCII8BIT-String, nil] accessor for pOldPublicData and ulOldPublicDataLen
421
421
  attr_accessor :pOldPublicData
422
- # @return [String, nil] accessor for pOldRandomA
422
+ # @return [ASCII8BIT-String, nil] accessor for pOldRandomA
423
423
  attr_accessor :pOldRandomA
424
- # @return [String, nil] accessor for pNewPassword and ulNewPasswordLen
424
+ # @return [ASCII8BIT-String, nil] accessor for pNewPassword and ulNewPasswordLen
425
425
  attr_accessor :pNewPassword
426
- # @return [String, nil] accessor for pNewPublicData and ulNewPublicDataLen
426
+ # @return [ASCII8BIT-String, nil] accessor for pNewPublicData and ulNewPublicDataLen
427
427
  attr_accessor :pNewPublicData
428
- # @return [String, nil] accessor for pNewRandomA
428
+ # @return [ASCII8BIT-String, nil] accessor for pNewRandomA
429
429
  attr_accessor :pNewRandomA
430
430
  # @return [Integer] accessor for ulOldRandomLen (CK_ULONG)
431
431
  attr_accessor :ulOldRandomLen
@@ -439,11 +439,11 @@ SIZEOF_STRUCT=Integer
439
439
  def to_s; end
440
440
  # @return [Array<String>] Attributes of this struct
441
441
  def members; end
442
- # @return [String, nil] accessor for pInitVector
442
+ # @return [ASCII8BIT-String, nil] accessor for pInitVector
443
443
  attr_accessor :pInitVector
444
- # @return [String, nil] accessor for pPassword and ulPasswordLen
444
+ # @return [UTF8-String, nil] accessor for pPassword and ulPasswordLen
445
445
  attr_accessor :pPassword
446
- # @return [String, nil] accessor for pSalt and ulSaltLen
446
+ # @return [ASCII8BIT-String, nil] accessor for pSalt and ulSaltLen
447
447
  attr_accessor :pSalt
448
448
  # @return [Integer] accessor for ulIteration (CK_ULONG)
449
449
  attr_accessor :ulIteration
@@ -455,7 +455,7 @@ SIZEOF_STRUCT=Integer
455
455
  def to_s; end
456
456
  # @return [Array<String>] Attributes of this struct
457
457
  def members; end
458
- # @return [String, nil] accessor for pX and ulXLen
458
+ # @return [ASCII8BIT-String, nil] accessor for pX and ulXLen
459
459
  attr_accessor :pX
460
460
  # @return [Integer] accessor for bBC (CK_BYTE)
461
461
  attr_accessor :bBC
@@ -467,9 +467,9 @@ SIZEOF_STRUCT=Integer
467
467
  def to_s; end
468
468
  # @return [Array<String>] Attributes of this struct
469
469
  def members; end
470
- # @return [String, nil] accessor for pClientRandom and ulClientRandomLen
470
+ # @return [ASCII8BIT-String, nil] accessor for pClientRandom and ulClientRandomLen
471
471
  attr_accessor :pClientRandom
472
- # @return [String, nil] accessor for pServerRandom and ulServerRandomLen
472
+ # @return [ASCII8BIT-String, nil] accessor for pServerRandom and ulServerRandomLen
473
473
  attr_accessor :pServerRandom
474
474
  end
475
475
  class PKCS11::CK_SSL3_MASTER_KEY_DERIVE_PARAMS < PKCS11::CStruct
@@ -491,9 +491,9 @@ SIZEOF_STRUCT=Integer
491
491
  def to_s; end
492
492
  # @return [Array<String>] Attributes of this struct
493
493
  def members; end
494
- # @return [String, nil] accessor for pIVClient
494
+ # @return [ASCII8BIT-String, nil] accessor for pIVClient
495
495
  attr_accessor :pIVClient
496
- # @return [String, nil] accessor for pIVServer
496
+ # @return [ASCII8BIT-String, nil] accessor for pIVServer
497
497
  attr_accessor :pIVServer
498
498
  # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
499
499
  attr_accessor :hClientMacSecret
@@ -531,9 +531,9 @@ SIZEOF_STRUCT=Integer
531
531
  def to_s; end
532
532
  # @return [Array<String>] Attributes of this struct
533
533
  def members; end
534
- # @return [String, nil] accessor for pClientRandom and ulClientRandomLen
534
+ # @return [ASCII8BIT-String, nil] accessor for pClientRandom and ulClientRandomLen
535
535
  attr_accessor :pClientRandom
536
- # @return [String, nil] accessor for pServerRandom and ulServerRandomLen
536
+ # @return [ASCII8BIT-String, nil] accessor for pServerRandom and ulServerRandomLen
537
537
  attr_accessor :pServerRandom
538
538
  end
539
539
  class PKCS11::CK_WTLS_MASTER_KEY_DERIVE_PARAMS < PKCS11::CStruct
@@ -543,7 +543,7 @@ SIZEOF_STRUCT=Integer
543
543
  def to_s; end
544
544
  # @return [Array<String>] Attributes of this struct
545
545
  def members; end
546
- # @return [String, nil] accessor for pVersion
546
+ # @return [ASCII8BIT-String, nil] accessor for pVersion
547
547
  attr_accessor :pVersion
548
548
  # @return [Integer] accessor for DigestMechanism (CK_ULONG)
549
549
  attr_accessor :DigestMechanism
@@ -557,11 +557,11 @@ SIZEOF_STRUCT=Integer
557
557
  def to_s; end
558
558
  # @return [Array<String>] Attributes of this struct
559
559
  def members; end
560
- # @return [String, nil] accessor for pSeed and ulSeedLen
560
+ # @return [ASCII8BIT-String, nil] accessor for pSeed and ulSeedLen
561
561
  attr_accessor :pSeed
562
- # @return [String, nil] accessor for pLabel and ulLabelLen
562
+ # @return [ASCII8BIT-String, nil] accessor for pLabel and ulLabelLen
563
563
  attr_accessor :pLabel
564
- # @return [String, nil] accessor for pOutput
564
+ # @return [ASCII8BIT-String, nil] accessor for pOutput
565
565
  attr_accessor :pOutput
566
566
  # @return [Integer] accessor for DigestMechanism (CK_ULONG)
567
567
  attr_accessor :DigestMechanism
@@ -575,7 +575,7 @@ SIZEOF_STRUCT=Integer
575
575
  def to_s; end
576
576
  # @return [Array<String>] Attributes of this struct
577
577
  def members; end
578
- # @return [String, nil] accessor for pIV
578
+ # @return [ASCII8BIT-String, nil] accessor for pIV
579
579
  attr_accessor :pIV
580
580
  # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
581
581
  attr_accessor :hMacSecret
@@ -613,11 +613,11 @@ SIZEOF_STRUCT=Integer
613
613
  def to_s; end
614
614
  # @return [Array<String>] Attributes of this struct
615
615
  def members; end
616
- # @return [String, nil] accessor for pContentType
616
+ # @return [UTF8-String, nil] accessor for pContentType
617
617
  attr_accessor :pContentType
618
- # @return [String, nil] accessor for pRequestedAttributes and ulRequestedAttributesLen
618
+ # @return [ASCII8BIT-String, nil] accessor for pRequestedAttributes and ulRequestedAttributesLen
619
619
  attr_accessor :pRequestedAttributes
620
- # @return [String, nil] accessor for pRequiredAttributes and ulRequiredAttributesLen
620
+ # @return [ASCII8BIT-String, nil] accessor for pRequiredAttributes and ulRequiredAttributesLen
621
621
  attr_accessor :pRequiredAttributes
622
622
  # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
623
623
  attr_accessor :certificateHandle
@@ -633,7 +633,7 @@ SIZEOF_STRUCT=Integer
633
633
  def to_s; end
634
634
  # @return [Array<String>] Attributes of this struct
635
635
  def members; end
636
- # @return [String, nil] accessor for pData and ulLen
636
+ # @return [ASCII8BIT-String, nil] accessor for pData and ulLen
637
637
  attr_accessor :pData
638
638
  end
639
639
  class PKCS11::CK_PKCS5_PBKD2_PARAMS < PKCS11::CStruct
@@ -643,11 +643,11 @@ SIZEOF_STRUCT=Integer
643
643
  def to_s; end
644
644
  # @return [Array<String>] Attributes of this struct
645
645
  def members; end
646
- # @return [String, nil] accessor for pSaltSourceData and ulSaltSourceDataLen
646
+ # @return [ASCII8BIT-String, nil] accessor for pSaltSourceData and ulSaltSourceDataLen
647
647
  attr_accessor :pSaltSourceData
648
- # @return [String, nil] accessor for pPrfData and ulPrfDataLen
648
+ # @return [ASCII8BIT-String, nil] accessor for pPrfData and ulPrfDataLen
649
649
  attr_accessor :pPrfData
650
- # @return [String, nil] accessor for pPassword
650
+ # @return [UTF8-String, nil] accessor for pPassword
651
651
  attr_accessor :pPassword
652
652
  # @return [Integer] accessor for saltSource (CK_ULONG)
653
653
  attr_accessor :saltSource
@@ -665,7 +665,7 @@ SIZEOF_STRUCT=Integer
665
665
  def to_s; end
666
666
  # @return [Array<String>] Attributes of this struct
667
667
  def members; end
668
- # @return [String, nil] accessor for pValue and ulValueLen
668
+ # @return [ASCII8BIT-String, nil] accessor for pValue and ulValueLen
669
669
  attr_accessor :pValue
670
670
  # @return [Integer] accessor for type (CK_ULONG)
671
671
  attr_accessor :type
@@ -697,7 +697,7 @@ SIZEOF_STRUCT=Integer
697
697
  def to_s; end
698
698
  # @return [Array<String>] Attributes of this struct
699
699
  def members; end
700
- # @return [String, nil] accessor for pSeed and ulSeedLen
700
+ # @return [ASCII8BIT-String, nil] accessor for pSeed and ulSeedLen
701
701
  attr_accessor :pSeed
702
702
  # @return [PKCS11::CK_MECHANISM, nil] pointer to struct
703
703
  attr_accessor :pMechanism
@@ -713,7 +713,7 @@ def to_s; end
713
713
  def members; end
714
714
  # @return [Integer] accessor for ulCounterBits (CK_ULONG)
715
715
  attr_accessor :ulCounterBits
716
- # @return [String] accessor for cb (max 16 bytes)
716
+ # @return [ASCII8BIT-String] accessor for cb (max 16 bytes)
717
717
  attr_accessor :cb
718
718
  end
719
719
  class PKCS11::CK_GCM_PARAMS < PKCS11::CStruct
@@ -723,9 +723,9 @@ SIZEOF_STRUCT=Integer
723
723
  def to_s; end
724
724
  # @return [Array<String>] Attributes of this struct
725
725
  def members; end
726
- # @return [String, nil] accessor for pIv and ulIvLen
726
+ # @return [ASCII8BIT-String, nil] accessor for pIv and ulIvLen
727
727
  attr_accessor :pIv
728
- # @return [String, nil] accessor for pAAD and ulAADLen
728
+ # @return [ASCII8BIT-String, nil] accessor for pAAD and ulAADLen
729
729
  attr_accessor :pAAD
730
730
  # @return [Integer] accessor for ulIvBits (CK_ULONG)
731
731
  attr_accessor :ulIvBits
@@ -739,9 +739,9 @@ SIZEOF_STRUCT=Integer
739
739
  def to_s; end
740
740
  # @return [Array<String>] Attributes of this struct
741
741
  def members; end
742
- # @return [String, nil] accessor for pNonce and ulNonceLen
742
+ # @return [ASCII8BIT-String, nil] accessor for pNonce and ulNonceLen
743
743
  attr_accessor :pNonce
744
- # @return [String, nil] accessor for pAAD and ulAADLen
744
+ # @return [ASCII8BIT-String, nil] accessor for pAAD and ulAADLen
745
745
  attr_accessor :pAAD
746
746
  # @return [Integer] accessor for ulDataLen (CK_ULONG)
747
747
  attr_accessor :ulDataLen
@@ -755,9 +755,9 @@ SIZEOF_STRUCT=Integer
755
755
  def to_s; end
756
756
  # @return [Array<String>] Attributes of this struct
757
757
  def members; end
758
- # @return [String, nil] accessor for pData and length
758
+ # @return [ASCII8BIT-String, nil] accessor for pData and length
759
759
  attr_accessor :pData
760
- # @return [String] accessor for iv (max 16 bytes)
760
+ # @return [ASCII8BIT-String] accessor for iv (max 16 bytes)
761
761
  attr_accessor :iv
762
762
  end
763
763
  class PKCS11::CK_ARIA_CBC_ENCRYPT_DATA_PARAMS < PKCS11::CStruct
@@ -767,9 +767,9 @@ SIZEOF_STRUCT=Integer
767
767
  def to_s; end
768
768
  # @return [Array<String>] Attributes of this struct
769
769
  def members; end
770
- # @return [String, nil] accessor for pData and length
770
+ # @return [ASCII8BIT-String, nil] accessor for pData and length
771
771
  attr_accessor :pData
772
- # @return [String] accessor for iv (max 16 bytes)
772
+ # @return [ASCII8BIT-String] accessor for iv (max 16 bytes)
773
773
  attr_accessor :iv
774
774
  end
775
775
  class PKCS11::CK_DSA_PARAMETER_GEN_PARAM < PKCS11::CStruct
@@ -779,7 +779,7 @@ SIZEOF_STRUCT=Integer
779
779
  def to_s; end
780
780
  # @return [Array<String>] Attributes of this struct
781
781
  def members; end
782
- # @return [String, nil] accessor for pSeed and ulSeedLen
782
+ # @return [ASCII8BIT-String, nil] accessor for pSeed and ulSeedLen
783
783
  attr_accessor :pSeed
784
784
  # @return [Integer] accessor for hash (CK_ULONG)
785
785
  attr_accessor :hash
@@ -793,7 +793,7 @@ SIZEOF_STRUCT=Integer
793
793
  def to_s; end
794
794
  # @return [Array<String>] Attributes of this struct
795
795
  def members; end
796
- # @return [String, nil] accessor for pSharedData and ulSharedDataLen
796
+ # @return [ASCII8BIT-String, nil] accessor for pSharedData and ulSharedDataLen
797
797
  attr_accessor :pSharedData
798
798
  # @return [Integer] accessor for ulAESKeyBits (CK_ULONG)
799
799
  attr_accessor :ulAESKeyBits
@@ -855,9 +855,9 @@ SIZEOF_STRUCT=Integer
855
855
  def to_s; end
856
856
  # @return [Array<String>] Attributes of this struct
857
857
  def members; end
858
- # @return [String, nil] accessor for pLabel
858
+ # @return [ASCII8BIT-String, nil] accessor for pLabel
859
859
  attr_accessor :pLabel
860
- # @return [String, nil] accessor for pContextData
860
+ # @return [ASCII8BIT-String, nil] accessor for pContextData
861
861
  attr_accessor :pContextData
862
862
  # @return [Integer] accessor for prfMechanism (CK_ULONG)
863
863
  attr_accessor :prfMechanism
@@ -889,9 +889,9 @@ SIZEOF_STRUCT=Integer
889
889
  def to_s; end
890
890
  # @return [Array<String>] Attributes of this struct
891
891
  def members; end
892
- # @return [String, nil] accessor for pPublicData and ulPublicDataLen
892
+ # @return [ASCII8BIT-String, nil] accessor for pPublicData and ulPublicDataLen
893
893
  attr_accessor :pPublicData
894
- # @return [String, nil] accessor for pUKM and ulUKMLen
894
+ # @return [ASCII8BIT-String, nil] accessor for pUKM and ulUKMLen
895
895
  attr_accessor :pUKM
896
896
  # @return [Integer] accessor for kdf (CK_ULONG)
897
897
  attr_accessor :kdf
@@ -903,9 +903,9 @@ SIZEOF_STRUCT=Integer
903
903
  def to_s; end
904
904
  # @return [Array<String>] Attributes of this struct
905
905
  def members; end
906
- # @return [String, nil] accessor for pWrapOID and ulWrapOIDLen
906
+ # @return [ASCII8BIT-String, nil] accessor for pWrapOID and ulWrapOIDLen
907
907
  attr_accessor :pWrapOID
908
- # @return [String, nil] accessor for pUKM and ulUKMLen
908
+ # @return [ASCII8BIT-String, nil] accessor for pUKM and ulUKMLen
909
909
  attr_accessor :pUKM
910
910
  # @return [Integer, PKCS11::Object] Object handle (CK_ULONG)
911
911
  attr_accessor :hKey