HP UX Kernel Cryptographic Module (KCM) manual Overview

Page 8

//Open session. Required for every crypto operation CK_SESSION_HANDLE hSession;

rv = C_OpenSession( 0, 0, NULL, NULL, );

//Set mechanism – type of crypto operation

CK_MECHANISM digestMechanism = { 0, NULL, 0 }; digestMechanism.mechanism = CKM_SHA256;

//Initialize crypto operation rv = C_DigestInit( hSession, );

//prepare input and output buffers uint8_t input[] = {'a', 'b', 'c'}; uint8_t digest[64];

uint32_t inputlen = sizeof( input ); uint64_t digestlen = sizeof( digest )

//Invoke crypto operation

rv = C_Digest( hSession, input, inputlen, digest, );

// Close crypto session

rv = C_CloseSession( hSession )

//Call this at the end of all crypto operations rv = C_Finalize( NULL_PTR );

8Overview

Image 8
Contents HP-UX Kernel Cryptographic Module 1.0 User Guide Page Contents Overview Supported configurationFeatures provided in this release Pkcs #11 API considerations Mechanisms supported by HPUX-KCM Initializes a message-digesting operation Overview Installing HP-UX KCM /tmp/HPUX-KCM.depotConfiguring HP-UX KCM Troubleshooting Removing HP-UX KCM How to contact HP Support and other resourcesInformation to collect before contacting HP Documentation feedbackCommand Typographic conventionsIndex Glossary KCM