-
Notifications
You must be signed in to change notification settings - Fork 1
/
pkcs11_5_10_decrypt.rpc
92 lines (86 loc) · 2.28 KB
/
pkcs11_5_10_decrypt.rpc
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
/* -*- c -*-
*
* Copyright (c) 2020-2023 Markku Rossi.
*
* All rights reserved.
*/
#include "vp_includes.h"
/** Version: 3.0 */
/** Section: 5.10 Decryption functions */
/* C_DecryptInit initializes a decryption operation. */
CK_RV
C_DecryptInit
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */
CK_OBJECT_HANDLE hKey /* handle of decryption key */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* Inputs:
* CK_MECHANISM pMechanism
* CK_OBJECT_HANDLE hKey
*/
}
/* C_Decrypt decrypts encrypted data in a single part. */
CK_RV
C_Decrypt
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pEncryptedData, /* ciphertext */
CK_ULONG ulEncryptedDataLen, /* ciphertext length */
CK_BYTE_PTR pData, /* gets plaintext */
CK_ULONG_PTR pulDataLen /* gets p-text size */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* Inputs:
* [CK_ULONG ulEncryptedDataLen]CK_BYTE pEncryptedData
* InOutputs:
* [CK_ULONG pulDataLen]CK_BYTE pData?
*/
}
/* C_DecryptUpdate continues a multiple-part decryption
* operation.
*/
CK_RV
C_DecryptUpdate
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pEncryptedPart, /* encrypted data */
CK_ULONG ulEncryptedPartLen, /* input length */
CK_BYTE_PTR pPart, /* gets plaintext */
CK_ULONG_PTR pulPartLen /* p-text size */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* Inputs:
* [CK_ULONG ulEncryptedPartLen]CK_BYTE pEncryptedPart
* InOutputs:
* [CK_ULONG pulPartLen]CK_BYTE pPart?
*/
}
/* C_DecryptFinal finishes a multiple-part decryption
* operation.
*/
CK_RV
C_DecryptFinal
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pLastPart, /* gets plaintext */
CK_ULONG_PTR pulLastPartLen /* p-text size */
)
{
/**
* Session:
* CK_SESSION_HANDLE hSession
* InOutputs:
* [CK_ULONG_PTR pulLastPartLen]CK_BYTE pLastPart?
*/
}