forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphene-pk11.d.ts
2719 lines (2666 loc) · 104 KB
/
graphene-pk11.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for graphene-pk11 v2.0.0
// Project: https://github.com/PeculiarVentures/graphene
// Definitions by: Stepan Miroshin <https://github.com/microshine>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/**
* A simple layer for interacting with PKCS #11 / PKCS11 / CryptoKI for Node
* v2.0.0
*/
declare module "graphene-pk11" {
type Callback = (err: Error, rv: number) => void;
type CK_PTR = Buffer;
class Pkcs11 {
lib: any;
/**
* load a library with PKCS11 interface
* @param {string} libFile path to PKCS11 library
*/
constructor(libFile: string);
protected callFunction(funcName: string, args: any[]): number;
/**
* C_Initialize initializes the Cryptoki library.
* @param pInitArgs if this is not NULL_PTR, it gets
* cast to CK_C_INITIALIZE_ARGS_PTR
* and dereferenced
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Initialize(pInitArgs?: CK_PTR): number;
C_Initialize(pInitArgs: CK_PTR, cllback: Callback): void;
/**
* C_Finalize indicates that an application is done with the Cryptoki library.
* @param pReserved reserved. Should be NULL_PTR
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Finalize(pReserved?: CK_PTR): number;
C_Finalize(pReserved: CK_PTR, callback: Callback): void;
/**
* C_GetInfo returns general information about Cryptoki.
* @param pInfo location that receives information
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetInfo(pInfo: CK_PTR): number;
C_GetInfo(pInfo: CK_PTR, callback: Callback): void;
/**
* C_GetSlotList obtains a list of slots in the system.
* @param {boolean} tokenPresent only slots with tokens?
* @param pSlotList receives array of slot IDs
* @param pulCount receives number of slots
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetSlotList(tokenPresent: boolean, pSlotList: CK_PTR, pulCount: CK_PTR): number;
C_GetSlotList(tokenPresent: boolean, pSlotList: CK_PTR, pulCount: CK_PTR, callback: Callback): void;
/**
* C_GetSlotInfo obtains information about a particular slot in
* the system.
* @param {number} slotID the ID of the slot
* @param {Buffer} pInfo receives the slot information
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetSlotInfo(slotID: number, pInfo: CK_PTR): number;
C_GetSlotInfo(slotID: number, pInfo: CK_PTR, callback: Callback): void;
/**
* C_GetTokenInfo obtains information about a particular token
* in the system.
* @param {number} slotID ID of the token's slot
* @param {Buffer} pInfo receives the token information
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetTokenInfo(slotID: number, pInfo: Buffer): number;
C_GetTokenInfo(slotID: number, pInfo: Buffer, callback: Callback): void;
/**
* C_GetMechanismList obtains a list of mechanism types
* supported by a token.
* @param {number} slotID ID of the token's slot
* @param {number} pMechanismList gets mech. array
* @param {number} pulCount gets # of mechs
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetMechanismList(slotID: number, pMechanismList: Buffer, pulCount: Buffer): number;
C_GetMechanismList(slotID: number, pMechanismList: Buffer, pulCount: Buffer, callback: Callback): void;
/** C_GetMechanismInfo obtains information about a particular
* mechanism possibly supported by a token.
* @param {number} slotID ID of the token's slot
* @param {number} type type of mechanism
* @param {Buffer} pInfo receives mechanism info
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetMechanismInfo(slotID: number, type: number, pInfo: Buffer): number;
C_GetMechanismInfo(slotID: number, type: number, pInfo: Buffer, callback: Callback): void;
/**
* C_InitToken initializes a token.
* @param {number} slotID ID of the token's slot
* @param {Buffer} pPin the SO's initial PIN
* @param {number} ulPinLen length in bytes of the PIN
* @param {number} pLabel 32-byte token label (blank padded)
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_InitToken(slotID: number, pPin: Buffer, ulPinLen: number, pLabel: Buffer): number;
C_InitToken(slotID: number, pPin: Buffer, ulPinLen: number, pLabel: Buffer, callback: Callback): void;
/**
* C_InitPIN initializes the normal user's PIN.
* @param {number} hSession the session's handle
* @param {Buffer} pPin the normal user's PIN
* @param {number} ulPinLen length in bytes of the PIN
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_InitPIN(hSession: number, pPin: Buffer, ulPinLen: number): number;
C_InitPIN(hSession: number, pPin: Buffer, ulPinLen: number, callback: Callback): void;
/**
* C_SetPIN modifies the PIN of the user who is logged in.
* @param {number} hSession the session's handle
* @param {Buffer} pOldPin the old PIN
* @param {number} ulOldLen length of the old PIN
* @param {Buffer} pNewPin the new PIN
* @param {number} ulNewLen length of the new PIN
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SetPIN(hSession: any, pOldPin: Buffer, ulOldLen: number, pNewPin: Buffer, ulNewLen: number): number;
C_SetPIN(hSession: any, pOldPin: Buffer, ulOldLen: number, pNewPin: Buffer, ulNewLen: number, callback: Callback): void;
/**
* C_OpenSession opens a session between an application and a
* token.
* @param {number} slotID ID of the token's slot
* @param {number} flags from CK_SESSION_INFO
* @param {Buffer} pApplication passed to callback
* @param {Buffer} Notify callback function
* @param {Buffer} phSession gets session handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_OpenSession(slotID: number, flags: number, pApplication?: Buffer, notify?: Buffer, phSession?: Buffer): number;
C_OpenSession(slotID: number, flags: number, pApplication: Buffer, notify: Buffer, phSession: Buffer, callback: Callback): void;
/**
* C_CloseSession closes a session between an application and a token.
* @param {number} hSession the session's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_CloseSession(hSession: number): number;
C_CloseSession(hSession: number, callback: Callback): void;
/**
* C_CloseAllSessions closes all sessions with a token.
* @param {number} slotID ID of the token's slot
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_CloseAllSessions(slotID: number): number;
C_CloseAllSessions(slotID: number, callback: Callback): void;
/**
* C_GetSessionInfo obtains information about the session.
* @param {number} hSession the session's handle
* @param {Buffer} pInfo receives session info
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetSessionInfo(hSession: number, pInfo: Buffer): number;
C_GetSessionInfo(hSession: number, pInfo: Buffer, callback: Callback): void;
/**
* C_GetOperationState obtains the state of the cryptographic operation in a session.
* @param {number} hSession the session's handle
* @param {Buffer} pOperationState gets state
* @param {Buffer} pulOperationStateLen gets state length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetOperationState(hSession: number, pOperationState: Buffer, pulOperationStateLen: Buffer): number;
C_GetOperationState(hSession: number, pOperationState: Buffer, pulOperationStateLen: Buffer, callback: Callback): void;
/**
* C_SetOperationState restores the state of the cryptographic operation in a session.
* @param {number} hSession the session's handle
* @param {Buffer} pOperationState holds state
* @param {number} ulOperationStateLen holds holds state length
* @param {number} hEncryptionKey en/decryption key
* @param {number} hAuthenticationKey sign/verify key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SetOperationState(hSession: number, pOperationState: Buffer, ulOperationStateLen: number, hEncryptionKey: number, hAuthenticationKey: number): number;
C_SetOperationState(hSession: number, pOperationState: Buffer, ulOperationStateLen: number, hEncryptionKey: number, hAuthenticationKey: number, callback: Callback): void;
/**
* C_Login logs a user into a token.
* @param {number} hSession the session's handle
* @param {number} userType the user type
* @param {Buffer} pPin the user's PIN
* @param {number} ulPinLen the length of the PIN
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Login(hSession: number, userType: number, pPin: Buffer, ulPinLen: number): number;
C_Login(hSession: number, userType: number, pPin: Buffer, ulPinLen: number, callback: Callback): void;
/**
* C_Logout logs a user out from a token.
* @param {number} hSession the session's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Logout(hSession: number): number;
C_Logout(hSession: number, callback: Callback): void;
/**
* C_CreateObject creates a new object.
* @param {number} hSession the session's handle
* @param {Buffer} pTemplate the object's template
* @param {number} ulCount attributes in template
* @param {Buffer} phObject gets new object's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_CreateObject(hSession: number, pTemplate: Buffer, ulCount: number, phObject: Buffer): number;
C_CreateObject(hSession: number, pTemplate: Buffer, ulCount: number, phObject: Buffer, callback: Callback): void;
/**
* C_CopyObject copies an object, creating a new object for the copy.
* @param {number} hSession the session's handle
* @param {number} hObject the object's handle
* @param {Buffer} pTemplate template for new object
* @param {number} ulCount attributes in template
* @param {Buffer} phNewObject receives handle of copy
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_CopyObject(hSession: number, hObject: number, pTemplate: Buffer, ulCount: number, phNewObject: Buffer): number;
C_CopyObject(hSession: number, hObject: number, pTemplate: Buffer, ulCount: number, phNewObject: Buffer, callback: Callback): void;
/**
* C_DestroyObject destroys an object.
* @param {number} hSession the session's handle
* @param {number} hObject the object's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DestroyObject(hSession: number, hObject: number): number;
C_DestroyObject(hSession: number, hObject: number, callback: Callback): void;
/**
* C_GetObjectSize gets the size of an object in bytes.
* @param {number} hSession the session's handle
* @param {number} hObject the object's handle
* @param {Buffer} pulSize receives size of object
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetObjectSize(hSession: number, hObject: number, pulSize: Buffer): number;
C_GetObjectSize(hSession: number, hObject: number, pulSize: Buffer, callback: Callback): void;
/**
* C_GetAttributeValue obtains the value of one or more object attributes.
* @param {number} hSession the session's handle
* @param {number} hObject the object's handle
* @param {Buffer} pTemplate specifies attrs; gets vals
* @param {number} ulCount attributes in template
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetAttributeValue(hSession: number, hObject: number, pTemplate: Buffer, ulCount: number): number;
C_GetAttributeValue(hSession: number, hObject: number, pTemplate: Buffer, ulCount: number, callback: Callback): void;
/**
* C_SetAttributeValue modifies the value of one or more object attributes
* @param {number} hSession the session's handle
* @param {number} hObject the object's handle
* @param {Buffer} pTemplate specifies attrs and values
* @param {number} ulCount attributes in template
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SetAttributeValue(hSession: number, hObject: number, pTemplate: Buffer, ulCount: number): number;
C_SetAttributeValue(hSession: number, hObject: number, pTemplate: Buffer, ulCount: number, callback: Callback): void;
/**
* C_FindObjectsInit initializes a search for token and session
* objects that match a template.
* @param {number} hSession the session's handle
* @param {Buffer} pTemplate attribute values to match
* @param {number} ulCount attrs in search template
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_FindObjectsInit(hSession: number, pTemplate: Buffer, ulCount: number): number;
C_FindObjectsInit(hSession: number, pTemplate: Buffer, ulCount: number, callback: Callback): void;
/**
* C_FindObjects continues a search for token and session
* objects that match a template, obtaining additional object
* handles.
* @param {number} hSession the session's handle
* @param {Buffer} phObject gets obj. handles
* @param {number} ulMaxObjectCount max handles to get
* @param {Buffer} pulObjectCount actual # returned
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_FindObjects(hSession: number, phObject: Buffer, ulMaxObjectCount: number, pulObjectCount: Buffer): number;
C_FindObjects(hSession: number, phObject: Buffer, ulMaxObjectCount: number, pulObjectCount: Buffer, callback: Callback): void;
/**
* C_FindObjectsFinal finishes a search for token and session objects.
* @param {number} hSession the session's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_FindObjectsFinal(hSession: number): number;
C_FindObjectsFinal(hSession: number, callback: Callback): void;
/**
* C_EncryptInit initializes an encryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the encryption mechanism
* @param {number} hKey handle of encryption key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_EncryptInit(hSession: number, pMechanism: Buffer, hKey: number): number;
C_EncryptInit(hSession: number, pMechanism: Buffer, hKey: number, callback: Callback): void;
/**
* C_Encrypt encrypts single-part data.
* @param {number} hSession the session's handle
* @param {Buffer} pData the plaintext data
* @param {number} ulDataLen bytes of plaintext
* @param {Buffer} pEncryptedData gets ciphertext
* @param {Buffer} pulEncryptedDataLen gets c-text size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Encrypt(hSession: number, pData: Buffer, ulDataLen: number, pEncryptedData: Buffer, pulEncryptedDataLen: Buffer): number;
C_Encrypt(hSession: number, pData: Buffer, ulDataLen: number, pEncryptedData: Buffer, pulEncryptedDataLen: Buffer, callback: Callback): void;
/**
* C_EncryptUpdate continues a multiple-part encryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pPart the plaintext data
* @param {number} ulPartLen plaintext data len
* @param {Buffer} pEncryptedPart gets ciphertext
* @param {Buffer} pulEncryptedPartLen gets c-text size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_EncryptUpdate(hSession: number, pPart: Buffer, ulPartLen: number, pEncryptedPart: Buffer, pulEncryptedPartLen: Buffer): number;
C_EncryptUpdate(hSession: number, pPart: Buffer, ulPartLen: number, pEncryptedPart: Buffer, pulEncryptedPartLen: Buffer, callback: Callback): void;
/**
* C_EncryptFinal finishes a multiple-part encryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pLastEncryptedPart last c-text
* @param {Buffer} pulLastEncryptedPartLen gets last size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_EncryptFinal(hSession: number, pLastEncryptedPart: Buffer, pulLastEncryptedPartLen: Buffer): number;
C_EncryptFinal(hSession: number, pLastEncryptedPart: Buffer, pulLastEncryptedPartLen: Buffer, callback: Callback): void;
/**
* C_DecryptInit initializes a decryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the decryption mechanism
* @param {number} hKey handle of decryption key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DecryptInit(hSession: number, pMechanism: Buffer, hKey: number): any;
C_DecryptInit(hSession: number, pMechanism: Buffer, hKey: number, callback: Callback): void;
/**
* C_Decrypt decrypts encrypted data in a single part.
* @param {number} hSession the session's handle
* @param {Buffer} pEncryptedData ciphertext
* @param {number} ulEncryptedDataLen ciphertext length
* @param {Buffer} pData gets plaintext
* @param {number} pulDataLen gets p-text size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Decrypt(hSession: number, pEncryptedData: Buffer, ulEncryptedDataLen: number, pData: Buffer, pulDataLen: Buffer): number;
C_Decrypt(hSession: number, pEncryptedData: Buffer, ulEncryptedDataLen: number, pData: Buffer, pulDataLen: Buffer, callback: Callback): void;
/**
* C_DecryptUpdate continues a multiple-part decryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pEncryptedPart encrypted data
* @param {number} ulEncryptedPartLen input length
* @param {Buffer} pPart gets plaintext
* @param {Buffer} pulPartLen p-text size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DecryptUpdate(hSession: number, pEncryptedPart: Buffer, ulEncryptedPartLen: number, pPart: Buffer, pulPartLen: Buffer): number;
C_DecryptUpdate(hSession: number, pEncryptedPart: Buffer, ulEncryptedPartLen: number, pPart: Buffer, pulPartLen: Buffer, callback: Callback): void;
/**
* C_DecryptFinal finishes a multiple-part decryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pLastPart gets plaintext
* @param {Buffer} pulLastPartLen p-text size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DecryptFinal(hSession: number, pLastPart: Buffer, pulLastPartLen: Buffer): number;
C_DecryptFinal(hSession: number, pLastPart: Buffer, pulLastPartLen: Buffer, callback: Callback): void;
/**
* C_DigestInit initializes a message-digesting operation.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the digesting mechanism
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DigestInit(hSession: number, pMechanism: Buffer): number;
C_DigestInit(hSession: number, pMechanism: Buffer, callback: Callback): void;
/**
* C_Digest digests data in a single part.
* @param {number} hSession the session's handle
* @param {Buffer} pData data to be digested
* @param {number} ulDataLen bytes of data to digest
* @param {Buffer} pDigest gets the message digest
* @param {Buffer} pulDigestLen gets digest length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Digest(hSession: number, pData: Buffer, ulDataLen: number, pDigest: Buffer, pulDigestLen: Buffer): number;
C_Digest(hSession: number, pData: Buffer, ulDataLen: number, pDigest: Buffer, pulDigestLen: Buffer, callback: Callback): void;
/**
* C_DigestUpdate continues a multiple-part message-digesting operation.
* @param {number} hSession the session's handle
* @param {Buffer} pPart data to be digested
* @param {number} ulPartLen bytes of data to be digested
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DigestUpdate(hSession: number, pPart: Buffer, ulPartLen: number): number;
C_DigestUpdate(hSession: number, pPart: Buffer, ulPartLen: number, callback: Callback): void;
/**
* C_DigestKey continues a multi-part message-digesting operation,
* by digesting the value of a secret key as part of
* the data already digested.
* @param {number} hSession the session's handle
* @param {number} hKey secret key to digest
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DigestKey(hSession: number, hKey: number): number;
C_DigestKey(hSession: number, hKey: number, callback: Callback): void;
/**
* C_DigestFinal finishes a multiple-part message-digesting
* operation.
* @param {number} hSession the session's handle
* @param {Buffer} pDigest gets the message digest
* @param {Buffer} pulDigestLen gets byte count of digest
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DigestFinal(hSession: number, pDigest: Buffer, pulDigestLen: Buffer): number;
C_DigestFinal(hSession: number, pDigest: Buffer, pulDigestLen: Buffer, callback: Callback): void;
/**
* C_SignInit initializes a signature (private key encryption)
* operation, where the signature is (will be) an appendix to
* the data, and plaintext cannot be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the signature mechanism
* @param {number} hKey handle of signature key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SignInit(hSession: number, pMechanism: Buffer, hKey: number): number;
C_SignInit(hSession: number, pMechanism: Buffer, hKey: number, callback: Callback): void;
/**
* C_Sign signs (encrypts with private key) data in a single
* part, where the signature is (will be) an appendix to the
* data, and plaintext cannot be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pData the data to sign
* @param {number} ulDataLen count of bytes to sign
* @param {Buffer} pSignature gets the signature
* @param {Buffer} pulSignatureLen gets signature length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Sign(hSession: number, pData: Buffer, ulDataLen: number, pSignature: Buffer, pulSignatureLen: Buffer): number;
C_Sign(hSession: number, pData: Buffer, ulDataLen: number, pSignature: Buffer, pulSignatureLen: Buffer, callback: Callback): void;
/**
* C_SignUpdate continues a multiple-part signature operation,
* where the signature is (will be) an appendix to the data,
* and plaintext cannot be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pPart the data to sign
* @param {number} ulPartLen count of bytes to sign
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SignUpdate(hSession: number, pPart: Buffer, ulPartLen: Buffer): number;
C_SignUpdate(hSession: number, pPart: Buffer, ulPartLen: Buffer, callback: Callback): void;
/**
* C_SignFinal finishes a multiple-part signature operation,
* returning the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pSignature gets the signature
* @param {Buffer} pulSignatureLen gets signature length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SignFinal(hSession: number, pSignature: Buffer, pulSignatureLen: Buffer): number;
C_SignFinal(hSession: number, pSignature: Buffer, pulSignatureLen: Buffer, callback: Callback): void;
/**
* C_SignRecoverInit initializes a signature operation, where
* the data can be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the signature mechanism
* @param {number} hKey handle of the signature key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SignRecoverInit(hSession: number, pMechanism: Buffer, hKey: number): number;
C_SignRecoverInit(hSession: number, pMechanism: Buffer, hKey: number, callback: Callback): void;
/**
* C_SignRecover signs data in a single operation, where the
* data can be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pData the data to sign
* @param {number} ulDataLen count of bytes to sign
* @param {Buffer} pSignature gets the signature
* @param {Buffer} pulSignatureLen gets signature length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SignRecover(hSession: number, pData: Buffer, ulDataLen: number, pSignature: Buffer, pulSignatureLen: Buffer): number;
C_SignRecover(hSession: number, pData: Buffer, ulDataLen: number, pSignature: Buffer, pulSignatureLen: Buffer, callback: Callback): void;
/**
* C_VerifyInit initializes a verification operation, where the
* signature is an appendix to the data, and plaintext cannot
* cannot be recovered from the signature (e.g. DSA).
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the verification mechanism
* @param {number} hKey verification key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_VerifyInit(hSession: number, pMechanism: Buffer, hKey: number): number;
C_VerifyInit(hSession: number, pMechanism: Buffer, hKey: number, callback: Callback): void;
/**
* C_Verify verifies a signature in a single-part operation,
* where the signature is an appendix to the data, and plaintext
* cannot be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pData signed data
* @param {number} ulDataLen length of signed data
* @param {Buffer} pSignature signature
* @param {number} ulSignatureLen signature length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_Verify(hSession: number, pData: Buffer, ulDataLen: number, pSignature: Buffer, ulSignatureLen: Buffer): number;
C_Verify(hSession: number, pData: Buffer, ulDataLen: number, pSignature: Buffer, ulSignatureLen: Buffer, callback: Callback): void;
/**
* C_VerifyUpdate continues a multiple-part verification
* operation, where the signature is an appendix to the data,
* and plaintext cannot be recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pPart signed data
* @param {number} ulPartLen length of signed data
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_VerifyUpdate(hSession: number, pPart: Buffer, ulPartLen: number): number;
C_VerifyUpdate(hSession: number, pPart: Buffer, ulPartLen: number, callback: Callback): void;
/**
* C_VerifyFinal finishes a multiple-part verification
* operation, checking the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pSignature signature to verify
* @param {number} ulSignatureLen signature length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_VerifyFinal(hSession: number, pSignature: Buffer, ulSignatureLen: number): number;
C_VerifyFinal(hSession: number, pSignature: Buffer, ulSignatureLen: number, callback: Callback): void;
/**
* C_VerifyRecoverInit initializes a signature verification
* operation, where the data is recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the verification mechanism
* @param {number} hKey verification key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_VerifyRecoverInit(hSession: number, pMechanism: Buffer, hKey: number): number;
C_VerifyRecoverInit(hSession: number, pMechanism: Buffer, hKey: number, callback: Callback): void;
/**
* C_VerifyRecover verifies a signature in a single-part
* operation, where the data is recovered from the signature.
* @param {number} hSession the session's handle
* @param {Buffer} pSignature signature to verify
* @param {number} ulSignatureLen signature length
* @param {Buffer} pData gets signed data
* @param {Buffer} pulDataLen gets signed data len
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_VerifyRecover(hSession: number, pSignature: Buffer, ulSignatureLen: number, pData: Buffer, pulDataLen: Buffer): number;
C_VerifyRecover(hSession: number, pSignature: Buffer, ulSignatureLen: number, pData: Buffer, pulDataLen: Buffer, callback: Callback): void;
/**
* C_DigestEncryptUpdate continues a multiple-part digesting
* and encryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pPart the plaintext data
* @param {number} ulPartLen plaintext length
* @param {Buffer} pEncryptedPart gets ciphertext
* @param {Buffer} pulEncryptedPartLen gets c-text length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DigestEncryptUpdate(hSession: number, pPart: Buffer, ulPartLen: number, pEncryptedPart: Buffer, pulEncryptedPartLen: Buffer): number;
C_DigestEncryptUpdate(hSession: number, pPart: Buffer, ulPartLen: number, pEncryptedPart: Buffer, pulEncryptedPartLen: Buffer, callback: Callback): void;
/**
* C_DecryptDigestUpdate continues a multiple-part decryption and
* digesting operation.
* @param {number} hSession the session's handle
* @param {Buffer} pEncryptedPart ciphertext
* @param {number} ulEncryptedPartLen ciphertext length
* @param {Buffer} pPart gets plaintext
* @param {Buffer} pulPartLen gets plaintext len
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DecryptDigestUpdate(hSession: number, pEncryptedPart: Buffer, ulEncryptedPartLen: number, pPart: Buffer, pulPartLen: Buffer): number;
C_DecryptDigestUpdate(hSession: number, pEncryptedPart: Buffer, ulEncryptedPartLen: number, pPart: Buffer, pulPartLen: Buffer, callback: Callback): void;
/**
* C_SignEncryptUpdate continues a multiple-part signing and
* encryption operation.
* @param {number} hSession the session's handle
* @param {Buffer} pPart the plaintext data
* @param {number} ulPartLen plaintext length
* @param {Buffer} pEncryptedPart gets ciphertext
* @param {Buffer} pulEncryptedPartLen gets c-text length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SignEncryptUpdate(hSession: number, pPart: Buffer, ulPartLen: number, pEncryptedPart: Buffer, pulEncryptedPartLen: Buffer): number;
C_SignEncryptUpdate(hSession: number, pPart: Buffer, ulPartLen: number, pEncryptedPart: Buffer, pulEncryptedPartLen: Buffer, callback: Callback): void;
/**
* C_DecryptVerifyUpdate continues a multiple-part decryption and
* verify operation.
* @param {number} hSession the session's handle
* @param {Buffer} pEncryptedPart ciphertext
* @param {number} ulEncryptedPartLen ciphertext length
* @param {Buffer} pPart gets plaintext
* @param {Buffer} pulPartLen gets p-text length
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DecryptVerifyUpdate(hSession: number, pEncryptedPart: Buffer, ulEncryptedPartLen: number, pPart: Buffer, pulPartLen: Buffer): number;
C_DecryptVerifyUpdate(hSession: number, pEncryptedPart: Buffer, ulEncryptedPartLen: number, pPart: Buffer, pulPartLen: Buffer, callback: Callback): void;
/**
* C_GenerateKey generates a secret key, creating a new key object.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism key generation mech.
* @param {Buffer} pTemplate template for new key
* @param {number} ulCount # of attrs in template
* @param {Buffer} phKey gets handle of new key
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GenerateKey(hSession: number, pMechanism: Buffer, pTemplate: Buffer, ulCount: number, phKey: Buffer): number;
C_GenerateKey(hSession: number, pMechanism: Buffer, pTemplate: Buffer, ulCount: number, phKey: Buffer, callback: Callback): any;
/**
* C_GenerateKeyPair generates a public-key/private-key pair,
* creating new key objects.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism key-gen mech.
* @param {Buffer} pPublicKeyTemplate template for public key
* @param {number} ulPublicKeyAttributeCount public attrs
* @param {Buffer} pPrivateKeyTemplate template for private key
* @param {number} ulPrivateKeyAttributeCount private attrs
* @param {Buffer} phPublicKey gets public key handle
* @param {Buffer} phPrivateKey gets private key handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GenerateKeyPair(hSession: number, pMechanism: Buffer, pPublicKeyTemplate: Buffer, ulPublicKeyAttributeCount: number, pPrivateKeyTemplate: Buffer, ulPrivateKeyAttributeCount: number, phPublicKey: Buffer, phPrivateKey: Buffer): number;
C_GenerateKeyPair(hSession: number, pMechanism: Buffer, pPublicKeyTemplate: Buffer, ulPublicKeyAttributeCount: number, pPrivateKeyTemplate: Buffer, ulPrivateKeyAttributeCount: number, phPublicKey: Buffer, phPrivateKey: Buffer, callback: Callback): void;
/**
* C_WrapKey wraps (i.e., encrypts) a key.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism the wrapping mechanism
* @param {number} hWrappingKey wrapping key
* @param {number} hKey key to be wrapped
* @param {Buffer} pWrappedKey gets wrapped key
* @param {Buffer} pulWrappedKeyLen gets wrapped key size
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_WrapKey(hSession: number, pMechanism: Buffer, hWrappingKey: number, hKey: number, pWrappedKey: Buffer, pulWrappedKeyLen: Buffer): number;
C_WrapKey(hSession: number, pMechanism: Buffer, hWrappingKey: number, hKey: number, pWrappedKey: Buffer, pulWrappedKeyLen: Buffer, callback: Callback): void;
/**
* C_UnwrapKey unwraps (decrypts) a wrapped key, creating a new
* key object.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism unwrapping mech.
* @param {Buffer} pWrappedKey the wrapped key
* @param {number} ulWrappedKeyLen wrapped key len
* @param {Buffer} pTemplate new key template
* @param {number} ulAttributeCount template length
* @param {Buffer} pTemplate new key template
* @param {number} ulAttributeCount template length
* @param {Buffer} phKey gets new handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_UnwrapKey(hSession: number, pMechanism: Buffer, hUnwrappingKey: number, pWrappedKey: Buffer, ulWrappedKeyLen: number, pTemplate: Buffer, ulAttributeCount: number, phKey: Buffer): number;
C_UnwrapKey(hSession: number, pMechanism: Buffer, hUnwrappingKey: number, pWrappedKey: Buffer, ulWrappedKeyLen: number, pTemplate: Buffer, ulAttributeCount: number, phKey: Buffer, callback: Callback): void;
/**
* C_DeriveKey derives a key from a base key, creating a new key object.
* @param {number} hSession the session's handle
* @param {Buffer} pMechanism key deriv. mech.
* @param {number} hBaseKey base key
* @param {Buffer} pTemplate new key template
* @param {number} ulAttributeCount template length
* @param {Buffer} phKey gets new handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_DeriveKey(hSession: number, pMechanism: Buffer, hBaseKey: number, pTemplate: Buffer, ulAttributeCount: number, phKey: Buffer): number;
C_DeriveKey(hSession: number, pMechanism: Buffer, hBaseKey: number, pTemplate: Buffer, ulAttributeCount: number, phKey: Buffer, callback: Callback): void;
/**
* C_SeedRandom mixes additional seed material into the token's
* random number generator.
* @param {number} hSession the session's handle
* @param {Buffer} pSeed the seed material
* @param {number} ulSeedLen length of seed material
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_SeedRandom(hSession: number, pSeed: Buffer, ulSeedLen: number): number;
C_SeedRandom(hSession: number, pSeed: Buffer, ulSeedLen: number, callback: Callback): void;
/**
* C_GenerateRandom generates random data.
* @param {number} hSession the session's handle
* @param {Buffer} pRandomData receives the random data
* @param {number} ulRandomLen # of bytes to generate
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GenerateRandom(hSession: number, pRandomData: Buffer, ulRandomLen: number): number;
C_GenerateRandom(hSession: number, pRandomData: Buffer, ulRandomLen: number, callback: Callback): void;
/**
* C_GetFunctionStatus is a legacy function; it obtains an
* updated status of a function running in parallel with an
* application.
* @param {number} hSession the session's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_GetFunctionStatus(hSession: number): number;
C_GetFunctionStatus(hSession: number, callback: Callback): void;
/**
* C_CancelFunction is a legacy function; it cancels a function
* running in parallel.
* @param {number} hSession the session's handle
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_CancelFunction(hSession: number): number;
C_CancelFunction(hSession: number, callback: Callback): void;
/**
* C_WaitForSlotEvent waits for a slot event (token insertion,
* removal, etc.) to occur.
* @param {number} flags blocking/nonblocking flag
* @param {Buffer} pSlot location that receives the slot ID
* @param {Buffer} pRserved reserved. Should be NULL_PTR
* @param {Callback} callback callback function with PKCS11 result value
* @returns void PKCS11 result value
*/
C_WaitForSlotEvent(flags: number, pSlot: Buffer, pRserved: Buffer): number;
C_WaitForSlotEvent(flags: number, pSlot: Buffer, pRserved: Buffer, callback: Callback): number;
}
enum KeyType {
RSA,
DSA,
DH,
ECDSA,
EC,
X9_42_DH,
KEA,
GENERIC_SECRET,
RC2,
RC4,
DES,
DES2,
DES3,
CAST,
CAST3,
CAST5,
CAST128,
RC5,
IDEA,
SKIPJACK,
BATON,
JUNIPER,
CDMF,
AES,
GOSTR3410,
GOSTR3411,
GOST28147,
BLOWFISH,
TWOFISH,
SECURID,
HOTP,
ACTI,
CAMELLIA,
ARIA,
}
enum KeyGenMechanism {
AES,
RSA,
RSA_X9_31,
DSA,
DH_PKCS,
DH_X9_42,
GOSTR3410,
GOST28147,
RC2,
RC4,
DES,
DES2,
SECURID,
ACTI,
CAST,
CAST3,
CAST5,
CAST128,
RC5,
IDEA,
GENERIC_SECRET,
SSL3_PRE_MASTER,
CAMELLIA,
ARIA,
SKIPJACK,
KEA,
BATON,
ECDSA,
EC,
JUNIPER,
TWOFISH,
}
enum MechanismEnum {
RSA_PKCS_KEY_PAIR_GEN,
RSA_PKCS,
RSA_9796,
RSA_X_509,
MD2_RSA_PKCS,
MD5_RSA_PKCS,
SHA1_RSA_PKCS,
RIPEMD128_RSA_PKCS,
RIPEMD160_RSA_PKCS,
RSA_PKCS_OAEP,
RSA_X9_31_KEY_PAIR_GEN,
RSA_X9_31,
SHA1_RSA_X9_31,
RSA_PKCS_PSS,
SHA1_RSA_PKCS_PSS,
DSA_KEY_PAIR_GEN,
DSA,
DSA_SHA1,
DH_PKCS_KEY_PAIR_GEN,
DH_PKCS_DERIVE,
X9_42_DH_KEY_PAIR_GEN,
X9_42_DH_DERIVE,
X9_42_DH_HYBRID_DERIVE,
X9_42_MQV_DERIVE,
SHA256_RSA_PKCS,
SHA384_RSA_PKCS,
SHA512_RSA_PKCS,
SHA256_RSA_PKCS_PSS,
SHA384_RSA_PKCS_PSS,
SHA512_RSA_PKCS_PSS,
SHA224_RSA_PKCS,
SHA224_RSA_PKCS_PSS,
RC2_KEY_GEN,
RC2_ECB,
RC2_CBC,
RC2_MAC,
RC2_MAC_GENERAL,
RC2_CBC_PAD,
RC4_KEY_GEN,
RC4,
DES_KEY_GEN,
DES_ECB,
DES_CBC,
DES_MAC,
DES_MAC_GENERAL,
DES_CBC_PAD,
DES2_KEY_GEN,
DES3_KEY_GEN,
DES3_ECB,
DES3_CBC,
DES3_MAC,
DES3_MAC_GENERAL,
DES3_CBC_PAD,
CDMF_KEY_GEN,
CDMF_ECB,
CDMF_CBC,
CDMF_MAC,
CDMF_MAC_GENERAL,
CDMF_CBC_PAD,
DES_OFB64,
DES_OFB8,
DES_CFB64,
DES_CFB8,
MD2,
MD2_HMAC,
MD2_HMAC_GENERAL,
MD5,
MD5_HMAC,
MD5_HMAC_GENERAL,
SHA1,
SHA,
SHA_1,
SHA_1_HMAC,
SHA_1_HMAC_GENERAL,
RIPEMD128,
RIPEMD128_HMAC,
RIPEMD128_HMAC_GENERAL,
RIPEMD160,
RIPEMD160_HMAC,
RIPEMD160_HMAC_GENERAL,
SHA256,
SHA256_HMAC,
SHA256_HMAC_GENERAL,
SHA224,
SHA224_HMAC,
SHA224_HMAC_GENERAL,
SHA384,
SHA384_HMAC,
SHA384_HMAC_GENERAL,
SHA512,
SHA512_HMAC,
SHA512_HMAC_GENERAL,
SECURID_KEY_GEN,
SECURID,
HOTP_KEY_GEN,
HOTP,
ACTI,
ACTI_KEY_GEN,
CAST_KEY_GEN,
CAST_ECB,
CAST_CBC,
CAST_MAC,
CAST_MAC_GENERAL,
CAST_CBC_PAD,
CAST3_KEY_GEN,
CAST3_ECB,
CAST3_CBC,
CAST3_MAC,
CAST3_MAC_GENERAL,
CAST3_CBC_PAD,
CAST5_KEY_GEN,
CAST128_KEY_GEN,
CAST5_ECB,
CAST128_ECB,
CAST5_CBC,
CAST128_CBC,
CAST5_MAC,
CAST128_MAC,
CAST5_MAC_GENERAL,
CAST128_MAC_GENERAL,
CAST5_CBC_PAD,
CAST128_CBC_PAD,
RC5_KEY_GEN,
RC5_ECB,
RC5_CBC,
RC5_MAC,
RC5_MAC_GENERAL,
RC5_CBC_PAD,
IDEA_KEY_GEN,
IDEA_ECB,
IDEA_CBC,
IDEA_MAC,
IDEA_MAC_GENERAL,
IDEA_CBC_PAD,
GENERIC_SECRET_KEY_GEN,
CONCATENATE_BASE_AND_KEY,
CONCATENATE_BASE_AND_DATA,
CONCATENATE_DATA_AND_BASE,
XOR_BASE_AND_DATA,
EXTRACT_KEY_FROM_KEY,
SSL3_PRE_MASTER_KEY_GEN,
SSL3_MASTER_KEY_DERIVE,
SSL3_KEY_AND_MAC_DERIVE,
SSL3_MASTER_KEY_DERIVE_DH,
TLS_PRE_MASTER_KEY_GEN,
TLS_MASTER_KEY_DERIVE,
TLS_KEY_AND_MAC_DERIVE,
TLS_MASTER_KEY_DERIVE_DH,
TLS_PRF,
SSL3_MD5_MAC,
SSL3_SHA1_MAC,
MD5_KEY_DERIVATION,
MD2_KEY_DERIVATION,
SHA1_KEY_DERIVATION,
SHA256_KEY_DERIVATION,
SHA384_KEY_DERIVATION,