TrustCore SDK NanoCert API reference  version 7.0
pkcs8.h
Go to the documentation of this file.
1 /*
2  * pkcs8.h
3  *
4  * PKCS #8 Header
5  *
6  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
7  * Proprietary and Confidential Material.
8  *
9  */
18 #ifndef __PKCS8_HEADER__
19 #define __PKCS8_HEADER__
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /*------------------------------------------------------------------*/
26 
27 #ifdef __ENABLE_MOCANA_PKCS8__
28 
71 MOC_EXTERN MSTATUS PKCS8_decodePrivateKeyPEM(const ubyte* pFilePemPkcs8, ubyte4 fileSizePemPkcs8, ubyte** ppRsaKeyBlob, ubyte4 *pRsaKeyBlobLength);
72 
117 MOC_EXTERN MSTATUS PKCS8_decodePrivateKeyDER(const ubyte* pFileDerPkcs8, ubyte4 fileSizeDerPkcs8, ubyte** ppRsaKeyBlob, ubyte4 *pRsaKeyBlobLength);
118 
119 #endif
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* __PKCS8_HEADER__*/
126 
MOC_EXTERN MSTATUS PKCS8_decodePrivateKeyDER(const ubyte *pFileDerPkcs8, ubyte4 fileSizeDerPkcs8, ubyte **ppRsaKeyBlob, ubyte4 *pRsaKeyBlobLength)
Extract a private key from a DER-encoded PKCS #8 object.
MOC_EXTERN MSTATUS PKCS8_decodePrivateKeyPEM(const ubyte *pFilePemPkcs8, ubyte4 fileSizePemPkcs8, ubyte **ppRsaKeyBlob, ubyte4 *pRsaKeyBlobLength)
Extract a private key from a PEM-encoded PKCS #8 object.