TrustCore SDK NanoCrypto API reference  version 7.0
key_utils.h
Go to the documentation of this file.
1 /*
2  * key_utils.h
3  *
4  * Digicert Initialization Header
5  *
6  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
7  * Proprietary and Confidential Material.
8  *
9  */
24 /*------------------------------------------------------------------*/
25 
26 #ifndef __KEY_UTILS_HEADER__
27 #define __KEY_UTILS_HEADER__
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #ifdef __ENABLE_MOCANA_KEY_UTILS__
34 
59 MOC_EXTERN void KEY_UTILS_PEMKeyIsEncrypted(ubyte *pPrivKey, ubyte4 privKeyLength, ubyte4 *retVal);
60 
61 
89 MOC_EXTERN MSTATUS KEY_UTILS_PEMKeyIsValid(MOC_ASYM(hwAccelDescr hwAccelCtx) ubyte *passphrase, ubyte *pPrivKey, ubyte4 privKeyLength, ubyte4 *retVal);
90 
123 MOC_EXTERN MSTATUS KEY_UTILS_CreateKeyBlobFromPEM(MOC_DSA(hwAccelDescr hwAccelCtx) ubyte *passphrase, ubyte *pPrivKey, ubyte4 privKeyLength, ubyte **pRetKeyBlob, ubyte4 *pRetKeyBlobLength, ubyte4 *retVal);
124 
125 #endif
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif /* __KEY_UTILS_HEADER__ */
MOC_EXTERN void KEY_UTILS_PEMKeyIsEncrypted(ubyte *pPrivKey, ubyte4 privKeyLength, ubyte4 *retVal)
Determine whether a PEM key is encrypted.
MOC_EXTERN MSTATUS KEY_UTILS_PEMKeyIsValid(MOC_ASYM(hwAccelDescr hwAccelCtx) ubyte *passphrase, ubyte *pPrivKey, ubyte4 privKeyLength, ubyte4 *retVal)
Determine whether a PEM-encoded private key is valid.
MOC_EXTERN MSTATUS KEY_UTILS_CreateKeyBlobFromPEM(MOC_DSA(hwAccelDescr hwAccelCtx) ubyte *passphrase, ubyte *pPrivKey, ubyte4 privKeyLength, ubyte **pRetKeyBlob, ubyte4 *pRetKeyBlobLength, ubyte4 *retVal)
Create a keyblob from a PEM-encoded private key.