| 1 | /* mz_crypt.h -- Crypto/hash functions |
| 2 | part of the minizip-ng project |
| 3 | |
| 4 | Copyright (C) Nathan Moinvaziri |
| 5 | https://github.com/zlib-ng/minizip-ng |
| 6 | |
| 7 | This program is distributed under the terms of the same license as zlib. |
| 8 | See the accompanying LICENSE file for the full text of the license. |
| 9 | */ |
| 10 | |
| 11 | #ifndef MZ_CRYPT_H |
| 12 | #define MZ_CRYPT_Hcxx . . $ `mz_crypt.h:12:9`! |
| 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | /***************************************************************************/ |
| 19 | |
| 20 | uint32_tcxx . . $ uint32_t# mz_crypt_crc32_updatecxx . . $ mz_crypt_crc32_update(c72eefe6f8c9ad5).(uint32_tcxx . . $ uint32_t# value, const uint8_tcxx . . $ uint8_t# *buf, int32_tcxx . . $ int32_t# size); |
| 21 | |
| 22 | int32_tcxx . . $ int32_t# mz_crypt_pbkdf2cxx . . $ mz_crypt_pbkdf2(94d1319d89cfb21a).(uint8_tcxx . . $ uint8_t# *password, int32_tcxx . . $ int32_t# password_length, uint8_tcxx . . $ uint8_t# *salt, int32_tcxx . . $ int32_t# salt_length, |
| 23 | uint32_tcxx . . $ uint32_t# iteration_count, uint8_tcxx . . $ uint8_t# *key, uint16_tcxx . . $ uint16_t# key_length); |
| 24 | |
| 25 | /***************************************************************************/ |
| 26 | |
| 27 | int32_tcxx . . $ int32_t# mz_crypt_randcxx . . $ mz_crypt_rand(7405b416d0535413).(uint8_tcxx . . $ uint8_t# *buf, int32_tcxx . . $ int32_t# size); |
| 28 | |
| 29 | void mz_crypt_sha_resetcxx . . $ mz_crypt_sha_reset(5d22bdacc48458e8).(void *handle); |
| 30 | int32_tcxx . . $ int32_t# mz_crypt_sha_begincxx . . $ mz_crypt_sha_begin(dedf1e9b1c614a07).(void *handle); |
| 31 | int32_tcxx . . $ int32_t# mz_crypt_sha_updatecxx . . $ mz_crypt_sha_update(91e54fd90adbb21).(void *handle, const void *buf, int32_tcxx . . $ int32_t# size); |
| 32 | int32_tcxx . . $ int32_t# mz_crypt_sha_endcxx . . $ mz_crypt_sha_end(78b1a2a92e9cffd0).(void *handle, uint8_tcxx . . $ uint8_t# *digest, int32_tcxx . . $ int32_t# digest_size); |
| 33 | int32_tcxx . . $ int32_t# mz_crypt_sha_set_algorithmcxx . . $ mz_crypt_sha_set_algorithm(f805ef7ae580f896).(void *handle, uint16_tcxx . . $ uint16_t# algorithm); |
| 34 | void *mz_crypt_sha_createcxx . . $ mz_crypt_sha_create(50c7df7de5344ebb).(void); |
| 35 | void mz_crypt_sha_deletecxx . . $ mz_crypt_sha_delete(539e082cf00e1f43).(void **handle); |
| 36 | |
| 37 | void mz_crypt_aes_resetcxx . . $ mz_crypt_aes_reset(5d22bdacc48458e8).(void *handle); |
| 38 | int32_tcxx . . $ int32_t# mz_crypt_aes_encryptcxx . . $ mz_crypt_aes_encrypt(fd2b9c01f5c5ae7c).(void *handle, const void *aad, int32_tcxx . . $ int32_t# aad_size, uint8_tcxx . . $ uint8_t# *buf, int32_tcxx . . $ int32_t# size); |
| 39 | int32_tcxx . . $ int32_t# mz_crypt_aes_encrypt_finalcxx . . $ mz_crypt_aes_encrypt_final(c04366ac26fafd79).(void *handle, uint8_tcxx . . $ uint8_t# *buf, int32_tcxx . . $ int32_t# size, uint8_tcxx . . $ uint8_t# *tag, int32_tcxx . . $ int32_t# tag_size); |
| 40 | int32_tcxx . . $ int32_t# mz_crypt_aes_decryptcxx . . $ mz_crypt_aes_decrypt(fd2b9c01f5c5ae7c).(void *handle, const void *aad, int32_tcxx . . $ int32_t# aad_size, uint8_tcxx . . $ uint8_t# *buf, int32_tcxx . . $ int32_t# size); |
| 41 | int32_tcxx . . $ int32_t# mz_crypt_aes_decrypt_finalcxx . . $ mz_crypt_aes_decrypt_final(fa83899873e546be).(void *handle, uint8_tcxx . . $ uint8_t# *buf, int32_tcxx . . $ int32_t# size, const uint8_tcxx . . $ uint8_t# *tag, int32_tcxx . . $ int32_t# tag_size); |
| 42 | int32_tcxx . . $ int32_t# mz_crypt_aes_set_encrypt_keycxx . . $ mz_crypt_aes_set_encrypt_key(73c51336f91d9328).(void *handle, const void *key, int32_tcxx . . $ int32_t# key_length, const void *iv, |
| 43 | int32_tcxx . . $ int32_t# iv_length); |
| 44 | int32_tcxx . . $ int32_t# mz_crypt_aes_set_decrypt_keycxx . . $ mz_crypt_aes_set_decrypt_key(73c51336f91d9328).(void *handle, const void *key, int32_tcxx . . $ int32_t# key_length, const void *iv, |
| 45 | int32_tcxx . . $ int32_t# iv_length); |
| 46 | void mz_crypt_aes_set_modecxx . . $ mz_crypt_aes_set_mode(d0320739773070f2).(void *handle, int32_tcxx . . $ int32_t# mode); |
| 47 | void *mz_crypt_aes_createcxx . . $ mz_crypt_aes_create(50c7df7de5344ebb).(void); |
| 48 | void mz_crypt_aes_deletecxx . . $ mz_crypt_aes_delete(539e082cf00e1f43).(void **handle); |
| 49 | |
| 50 | void mz_crypt_hmac_resetcxx . . $ mz_crypt_hmac_reset(5d22bdacc48458e8).(void *handle); |
| 51 | int32_tcxx . . $ int32_t# mz_crypt_hmac_initcxx . . $ mz_crypt_hmac_init(91e54fd90adbb21).(void *handle, const void *key, int32_tcxx . . $ int32_t# key_length); |
| 52 | int32_tcxx . . $ int32_t# mz_crypt_hmac_updatecxx . . $ mz_crypt_hmac_update(91e54fd90adbb21).(void *handle, const void *buf, int32_tcxx . . $ int32_t# size); |
| 53 | int32_tcxx . . $ int32_t# mz_crypt_hmac_endcxx . . $ mz_crypt_hmac_end(78b1a2a92e9cffd0).(void *handle, uint8_tcxx . . $ uint8_t# *digest, int32_tcxx . . $ int32_t# digest_size); |
| 54 | int32_tcxx . . $ int32_t# mz_crypt_hmac_copycxx . . $ mz_crypt_hmac_copy(361d5d7064a2a85d).(void *src_handle, void *target_handle); |
| 55 | void mz_crypt_hmac_set_algorithmcxx . . $ mz_crypt_hmac_set_algorithm(7ff71eb16271959b).(void *handle, uint16_tcxx . . $ uint16_t# algorithm); |
| 56 | void *mz_crypt_hmac_createcxx . . $ mz_crypt_hmac_create(50c7df7de5344ebb).(void); |
| 57 | void mz_crypt_hmac_deletecxx . . $ mz_crypt_hmac_delete(539e082cf00e1f43).(void **handle); |
| 58 | |
| 59 | /***************************************************************************/ |
| 60 | |
| 61 | #ifdef __cplusplus |
| 62 | } |
| 63 | #endif |
| 64 | |
| 65 | #endif |