Files
ESP8266_RTOS_SDK/include/wolfssl/wolfcrypt/pwdbased.h
2018-07-09 19:45:07 +08:00

63 lines
1.9 KiB
C

/* pwdbased.h
*
* Copyright (C) 2006-2018 wolfSSL Inc. All rights reserved.
*
* This file is part of wolfSSL.
*
* Contact licensing@wolfssl.com with any questions or comments.
*
* http://www.wolfssl.com
*/
/*!
\file wolfssl/wolfcrypt/pwdbased.h
*/
#ifndef WOLF_CRYPT_PWDBASED_H
#define WOLF_CRYPT_PWDBASED_H
#include <wolfssl/wolfcrypt/types.h>
#ifndef NO_PWDBASED
#ifdef __cplusplus
extern "C" {
#endif
/*
* hashType renamed to typeH to avoid shadowing global declaration here:
* wolfssl/wolfcrypt/asn.h line 173 in enum Oid_Types
*/
WOLFSSL_API int wc_PBKDF1_ex(byte* key, int keyLen, byte* iv, int ivLen,
const byte* passwd, int passwdLen,
const byte* salt, int saltLen, int iterations,
int hashType, void* heap);
WOLFSSL_API int wc_PBKDF1(byte* output, const byte* passwd, int pLen,
const byte* salt, int sLen, int iterations, int kLen,
int typeH);
WOLFSSL_API int wc_PBKDF2(byte* output, const byte* passwd, int pLen,
const byte* salt, int sLen, int iterations, int kLen,
int typeH);
WOLFSSL_API int wc_PKCS12_PBKDF(byte* output, const byte* passwd, int pLen,
const byte* salt, int sLen, int iterations,
int kLen, int typeH, int purpose);
WOLFSSL_API int wc_PKCS12_PBKDF_ex(byte* output, const byte* passwd,int passLen,
const byte* salt, int saltLen, int iterations, int kLen,
int hashType, int id, void* heap);
#ifdef HAVE_SCRYPT
WOLFSSL_API int wc_scrypt(byte* output, const byte* passwd, int passLen,
const byte* salt, int saltLen, int cost,
int blockSize, int parallel, int dkLen);
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* NO_PWDBASED */
#endif /* WOLF_CRYPT_PWDBASED_H */