- Timestamp:
- Feb 7, 2019, 8:36:33 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/wolfssl-3.12.2/wolfssl/wolfcrypt/wc_encrypt.h
r352 r372 20 20 */ 21 21 22 /*! 23 \file wolfssl/wolfcrypt/wc_encrypt.h 24 */ 22 25 23 26 … … 26 29 27 30 #include <wolfssl/wolfcrypt/types.h> 31 #include <wolfssl/wolfcrypt/aes.h> 32 #include <wolfssl/wolfcrypt/chacha.h> 33 #include <wolfssl/wolfcrypt/des3.h> 34 #include <wolfssl/wolfcrypt/arc4.h> 28 35 29 36 #ifdef __cplusplus … … 31 38 #endif 32 39 40 /* determine max cipher key size */ 33 41 #ifndef NO_AES 42 #define WC_MAX_SYM_KEY_SIZE (AES_MAX_KEY_SIZE/8) 43 #elif defined(HAVE_CHACHA) 44 #define WC_MAX_SYM_KEY_SIZE CHACHA_MAX_KEY_SZ 45 #elif !defined(NO_DES3) 46 #define WC_MAX_SYM_KEY_SIZE DES3_KEY_SIZE 47 #elif !defined(NO_RC4) 48 #define WC_MAX_SYM_KEY_SIZE RC4_KEY_SIZE 49 #else 50 #define WC_MAX_SYM_KEY_SIZE 32 51 #endif 52 53 54 #if !defined(NO_AES) && defined(HAVE_AES_CBC) 34 55 WOLFSSL_API int wc_AesCbcEncryptWithKey(byte* out, const byte* in, word32 inSz, 35 56 const byte* key, word32 keySz, … … 56 77 #endif /* !NO_DES3 */ 57 78 79 80 81 82 #ifdef WOLFSSL_ENCRYPTED_KEYS 83 struct EncryptedInfo; 84 WOLFSSL_API int wc_BufferKeyDecrypt(struct EncryptedInfo* info, byte* der, word32 derSz, 85 const byte* password, int passwordSz, int hashType); 86 WOLFSSL_API int wc_BufferKeyEncrypt(struct EncryptedInfo* info, byte* der, word32 derSz, 87 const byte* password, int passwordSz, int hashType); 88 #endif /* WOLFSSL_ENCRYPTED_KEYS */ 89 90 #ifndef NO_PWDBASED 91 WOLFSSL_LOCAL int wc_CryptKey(const char* password, int passwordSz, 92 byte* salt, int saltSz, int iterations, int id, byte* input, int length, 93 int version, byte* cbcIv, int enc); 94 #endif 95 58 96 #ifdef __cplusplus 59 97 } /* extern "C" */
Note:
See TracChangeset
for help on using the changeset viewer.