Encrypt or decrypt a buffer using a PKCS#12 PBE algorithm.

Synopsis

Declared in <openssl/pkcs12.h>

unsigned char*
PKCS12_pbe_crypt(
    X509_ALGOR const* algor,
    char const* pass,
    int passlen,
    unsigned char const* in,
    int inlen,
    unsigned char** data,
    int* datalen,
    int en_de);

Return Value

Pointer to output buffer (same as *`data),` or NULL on error.

Parameters

Name

Description

algor

PBE algorithm identifier.

pass

Passphrase.

passlen

Length of pass, or ‐1 to use strlen().

in

Input buffer.

inlen

Length of in in bytes.

data

Address of output buffer pointer (malloc'd on success).

datalen

Address to receive output length in bytes.

en_de

1 to encrypt, 0 to decrypt.

Created with MrDocs