22 #ifndef FREERDP_CRYPTO_H
23 #define FREERDP_CRYPTO_H
25 #include <freerdp/api.h>
26 #include <freerdp/types.h>
27 #include <freerdp/crypto/certificate_data.h>
41 FREERDP_API
char* crypto_base64_encode(
const BYTE* WINPR_RESTRICT data,
size_t length);
53 FREERDP_API
char* crypto_base64_encode_ex(
const BYTE* WINPR_RESTRICT data,
size_t length,
56 FREERDP_API
void crypto_base64_decode(
const char* WINPR_RESTRICT enc_data,
size_t length,
57 BYTE** WINPR_RESTRICT dec_data,
58 size_t* WINPR_RESTRICT res_length);
60 FREERDP_API
char* crypto_base64url_encode(
const BYTE* WINPR_RESTRICT data,
size_t length);
61 FREERDP_API
void crypto_base64url_decode(
const char* WINPR_RESTRICT enc_data,
size_t length,
62 BYTE** WINPR_RESTRICT dec_data,
63 size_t* WINPR_RESTRICT res_length);
65 FREERDP_API
char* crypto_read_pem(
const char* WINPR_RESTRICT filename,
66 size_t* WINPR_RESTRICT plength);
67 FREERDP_API BOOL crypto_write_pem(
const char* WINPR_RESTRICT filename,
68 const char* WINPR_RESTRICT pem,
size_t length);