Encrypt or decrypt a buffer using a PKCS#12 PBE algorithm.
Declared in <openssl/pkcs12.h>
unsigned char*
PKCS12_pbe_crypt_ex(
X509_ALGOR const* algor,
char const* pass,
int passlen,
unsigned char const* in,
int inlen,
unsigned char** data,
int* datalen,
int en_de,
OSSL_LIB_CTX* libctx,
char const* propq);
Pointer to output buffer (same as *data), or NULL on error.
| 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. |
| libctx | Library context for algorithm fetching, or NULL for default. |
| propq | Property query for algorithm fetching, or NULL. |