Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Enumerations | Functions
lc_pem.h File Reference

Go to the source code of this file.

Enumerations

enum  lc_pem_flags {
  lc_pem_flag_nopem = 0 , lc_pem_flag_certificate = (1 << 0) , lc_pem_flag_priv_key = (1 << 1) , lc_pem_flag_cms = (1 << 2) ,
  lc_pem_flag_csr = (1 << 3)
}
 

Functions

int lc_pem_encode_len (size_t ilen, size_t *olen, enum lc_pem_flags flags)
 Obtain length of PEM string from given binary input string. More...
 
int lc_pem_decode_len (const char *idata, size_t ilen, size_t *olen, uint8_t *blank_chars, enum lc_pem_flags flags)
 Obtain length of binary string from given PEM input string. More...
 
int lc_pem_encode (const uint8_t *idata, size_t ilen, char *odata, size_t olen, enum lc_pem_flags flags)
 PEM encode of arbitrary data. More...
 
int lc_pem_decode (const char *idata, size_t ilen, uint8_t *odata, size_t olen, enum lc_pem_flags flags)
 PEM decoding of arbitrary data. More...
 
int lc_pem_is_encoded (const char *idata, size_t ilen, enum lc_pem_flags flags)
 Check if input data is PEM encoded. More...
 
int lc_pem_type (enum lc_pem_flags *flags, const char *idata, size_t ilen)
 Decode the PEM file type. More...
 

Enumeration Type Documentation

◆ lc_pem_flags

Enumerator
lc_pem_flag_nopem 

Binary data is not treated as PEM data

lc_pem_flag_certificate 

Binary data is a X.509 certificate

lc_pem_flag_priv_key 

Binary data is a PKCS8 private key

lc_pem_flag_cms 

Binary data is a CMS object

lc_pem_flag_csr 

Binary data is a CSR object

Definition at line 27 of file lc_pem.h.