wolfSSL SSL/TLS library, support up to TLS1.3

Dependents:   CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pwdbased.h Source File

pwdbased.h

Go to the documentation of this file.
00001 /* pwdbased.h
00002  *
00003  * Copyright (C) 2006-2020 wolfSSL Inc.
00004  *
00005  * This file is part of wolfSSL.
00006  *
00007  * wolfSSL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * wolfSSL is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
00020  */
00021 
00022 /*!
00023     \file wolfssl/wolfcrypt/pwdbased.h
00024 */
00025 
00026 #ifndef WOLF_CRYPT_PWDBASED_H
00027 #define WOLF_CRYPT_PWDBASED_H
00028 
00029 #include <wolfssl/wolfcrypt/types.h >
00030 
00031 #ifndef NO_PWDBASED
00032 
00033 
00034 #ifdef __cplusplus
00035     extern "C" {
00036 #endif
00037 
00038 /*
00039  * hashType renamed to typeH to avoid shadowing global declaration here:
00040  * wolfssl/wolfcrypt/asn.h line 173 in enum Oid_Types
00041  */
00042 WOLFSSL_API int wc_PBKDF1_ex(byte* key, int keyLen, byte* iv, int ivLen,
00043                       const byte* passwd, int passwdLen, 
00044                       const byte* salt, int saltLen, int iterations, 
00045                       int hashType, void* heap);
00046 WOLFSSL_API int wc_PBKDF1(byte* output, const byte* passwd, int pLen,
00047                       const byte* salt, int sLen, int iterations, int kLen,
00048                       int typeH);
00049 WOLFSSL_API int wc_PBKDF2_ex(byte* output, const byte* passwd, int pLen,
00050                     const byte* salt, int sLen, int iterations, int kLen,
00051                     int typeH, void* heap, int devId);
00052 WOLFSSL_API int wc_PBKDF2(byte* output, const byte* passwd, int pLen,
00053                       const byte* salt, int sLen, int iterations, int kLen,
00054                       int typeH);
00055 WOLFSSL_API int wc_PKCS12_PBKDF(byte* output, const byte* passwd, int pLen,
00056                             const byte* salt, int sLen, int iterations,
00057                             int kLen, int typeH, int purpose);
00058 WOLFSSL_API int wc_PKCS12_PBKDF_ex(byte* output, const byte* passwd,int passLen,
00059                        const byte* salt, int saltLen, int iterations, int kLen,
00060                        int hashType, int id, void* heap);
00061 
00062 #ifdef HAVE_SCRYPT
00063 WOLFSSL_API int wc_scrypt(byte* output, const byte* passwd, int passLen,
00064                           const byte* salt, int saltLen, int cost,
00065                           int blockSize, int parallel, int dkLen);
00066 WOLFSSL_API int wc_scrypt_ex(byte* output, const byte* passwd, int passLen,
00067                              const byte* salt, int saltLen, word32 iterations,
00068                              int blockSize, int parallel, int dkLen);
00069 #endif
00070 
00071 
00072 #ifdef __cplusplus
00073     } /* extern "C" */
00074 #endif
00075 
00076 #endif /* NO_PWDBASED */
00077 #endif /* WOLF_CRYPT_PWDBASED_H */
00078