Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cPKCS12 Class Reference

#include <cPKCS.h>

Static Public Member Functions

static HRESULT ParsePBE_sha1_rc4_128 (const cASNBuf &pbe_params, bool bEncodeMode, const cMemBlock &password, const cMemBlock &data, BYTE *output)
 
static HRESULT ParsePBE (const cASNBuf &pbe_params, bool bEncodeMode, SSL_Cipher_TYPE eCipherType, SSL_Hash_TYPE md_type, const cMemBlock &password, const cMemBlock &data, BYTE *output)
 

Detailed Description

https://en.wikipedia.org/wiki/PKCS_12 used for key reading. PKCS stands for "Public Key Cryptography Standards" helper used by cKeyWrap reader for OID_PKCS12_PBE_SHA1_RC4_128

Member Function Documentation

◆ ParsePBE()

HRESULT GrayLib::cPKCS12::ParsePBE ( const cASNBuf pbe_params,
bool  bEncodeMode,
SSL_Cipher_TYPE  eCipherType,
SSL_Hash_TYPE  md_type,
const cMemBlock password,
const cMemBlock data,
BYTE *  output 
)
static

called from cKeyWrap using cOID::FindPkcs12Pbe() PKCS12 Password Based function (encryption / decryption) for cipher-based and md-based PBE's

  • pbe_params = ASN1 buffer containing the pkcs-12PbeParams structure
  • bEncodeMode =
  • eCipherType = the cipher used
  • eHashType = the Hash used
  • pPassword = the password used (may be NULL if no password is used)
  • nPassSize = length of the password (may be 0)
  • data = the input data
  • pOutput = the output buffer
    Returns
    0 if successful, or <0 = error code.

◆ ParsePBE_sha1_rc4_128()

HRESULT GrayLib::cPKCS12::ParsePBE_sha1_rc4_128 ( const cASNBuf pbe_params,
bool  bEncodeMode,
const cMemBlock password,
const cMemBlock data,
BYTE *  output 
)
static

OID_PKCS12_PBE_SHA1_RC4_128 PKCS12 Password Based function (encryption / decryption) for pbeWithSHAAnd128BitRC4

  • pbe_params = ASN1 buffer containing the pkcs-12PbeParams structure
  • bEncodeMode
  • pPassword = the password used (may be NULL if no password is used)
  • pInput = the pInput data
  • len = data length
  • output = the output buffer
    Returns
    0 if successful, or <0 = error code.

The documentation for this class was generated from the following files: