HID® Crescendo® PKCS11
c_random.h File Reference
#include <pkcs11/v2.40/cryptoki.h>

Functions

CK_RV C_GenerateRandom (CK_SESSION_HANDLE hSession, CK_BYTE_PTR pRandomData, CK_ULONG ulRandomLen)
 Generates random or pseudo-random data. More...
 
CK_RV C_SeedRandom (CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSeed, CK_ULONG ulSeedLen)
 Mixes additional seed material into the token’s random number generator. More...
 

Function Documentation

◆ C_GenerateRandom()

CK_RV C_GenerateRandom ( CK_SESSION_HANDLE  hSession,
CK_BYTE_PTR  pRandomData,
CK_ULONG  ulRandomLen 
)

Generates random or pseudo-random data.

Warning
This function is not supported.
Parameters
[in]hSessionis the session's handle.
[out]pRandomDatapoints to the location that receives the random data.
[in]ulRandomLenis the length in bytes of the random or pseudo-random data to be generated.
Returns
  • CKR_OK on success.
  • One of the following error codes on failure:
    CKR_ARGUMENTS_BAD, CKR_CRYPTOKI_NOT_INITIALIZED, CKR_DEVICE_ERROR, CKR_DEVICE_MEMORY, CKR_DEVICE_REMOVED, CKR_FUNCTION_CANCELED, CKR_FUNCTION_FAILED, CKR_GENERAL_ERROR, CKR_HOST_MEMORY, CKR_OPERATION_ACTIVE, CKR_RANDOM_NO_RNG, CKR_SESSION_CLOSED, CKR_SESSION_HANDLE_INVALID, CKR_USER_NOT_LOGGED_IN.

◆ C_SeedRandom()

CK_RV C_SeedRandom ( CK_SESSION_HANDLE  hSession,
CK_BYTE_PTR  pSeed,
CK_ULONG  ulSeedLen 
)

Mixes additional seed material into the token’s random number generator.

Warning
This function is not supported.
Parameters
[in]hSessionis the session's handle.
[in]pSeedpoints to the seed material.
[in]ulSeedLenis the length in bytes of the seed material.
Returns
  • CKR_OK on success.
  • One of the following error codes on failure:
    CKR_ARGUMENTS_BAD, CKR_CRYPTOKI_NOT_INITIALIZED, CKR_DEVICE_ERROR, CKR_DEVICE_MEMORY, CKR_DEVICE_REMOVED, CKR_FUNCTION_CANCELED, CKR_FUNCTION_FAILED, CKR_GENERAL_ERROR, CKR_HOST_MEMORY, CKR_OPERATION_ACTIVE, CKR_RANDOM_SEED_NOT_SUPPORTED, CKR_RANDOM_NO_RNG, CKR_SESSION_CLOSED, CKR_SESSION_HANDLE_INVALID, CKR_USER_NOT_LOGGED_IN.