ssh lib

Dependents:   OS

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pwdbased.h Source File

pwdbased.h

00001 /* pwdbased.h
00002  *
00003  * Copyright (C) 2006-2017 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 <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(byte* output, const byte* passwd, int pLen,
00050                       const byte* salt, int sLen, int iterations, int kLen,
00051                       int typeH);
00052 WOLFSSL_API int wc_PKCS12_PBKDF(byte* output, const byte* passwd, int pLen,
00053                             const byte* salt, int sLen, int iterations,
00054                             int kLen, int typeH, int purpose);
00055 WOLFSSL_API int wc_PKCS12_PBKDF_ex(byte* output, const byte* passwd,int passLen,
00056                        const byte* salt, int saltLen, int iterations, int kLen,
00057                        int hashType, int id, void* heap);
00058 
00059 #ifdef HAVE_SCRYPT
00060 WOLFSSL_API int wc_scrypt(byte* output, const byte* passwd, int passLen,
00061                           const byte* salt, int saltLen, int cost,
00062                           int blockSize, int parallel, int dkLen);
00063 #endif
00064 
00065 
00066 #ifdef __cplusplus
00067     } /* extern "C" */
00068 #endif
00069 
00070 #endif /* NO_PWDBASED */
00071 #endif /* WOLF_CRYPT_PWDBASED_H */
00072