29 #define PBKDF2_BUFFER_LENGTH 64
37 uint8_t work[PBKDF2_BUFFER_LENGTH];
38 uint8_t md1[PBKDF2_BUFFER_LENGTH];
40 #if !defined(HAVE_SHA512) && !defined(HAVE_SHA384) && !defined(HAVE_SHA256) && !defined(HAVE_SHA224)
41 #error No hmac defined for pbkdf2 support
46 #if defined(HAVE_HMAC) && (defined(HAVE_SHA512) || defined(HAVE_SHA384))
47 cx_hmac_sha512_t hmac_sha512;
50 #if defined(HAVE_HMAC) && (defined(HAVE_SHA256) || defined(HAVE_SHA224))
51 cx_hmac_sha256_t hmac_sha256;
55 typedef struct cx_pbkdf2_s cx_pbkdf2_t;
57 WARN_UNUSED_RESULT cx_err_t cx_pbkdf2_hmac(cx_md_t md_type,
HMAC (Keyed-Hash Message Authentication Code)