| 1 | /* Copyright (C) 2024 Björn Esser <[email protected]> |
| 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted. |
| 5 | * |
| 6 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| 7 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 8 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 9 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 10 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 11 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 12 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 13 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 14 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 15 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 16 | * SUCH DAMAGE. |
| 17 | */ |
| 18 | |
| 19 | #ifndef _CRYPT_ALG_SM3_HMAC_H |
| 20 | #define _CRYPT_ALG_SM3_HMAC_Hcxx . . $ `lib/alg-sm3-hmac.h:20:9`! |
| 21 | |
| 22 | #include "alg-sm3.h"cxx . . $ `<file>/lib/alg-sm3.h`/ |
| 23 | |
| 24 | typedef structcxx . . $ $anonymous_type_d8e841edf38d0a58_0# |
| 25 | { |
| 26 | sm3_ctxcxx . . $ sm3_ctx# sm3_ctxcxx . . $ $anonymous_type_d8e841edf38d0a58_0#sm3_ctx.; |
| 27 | uint8_tcxx . . $ uint8_t# keycxx . . $ $anonymous_type_d8e841edf38d0a58_0#key.[64]; |
| 28 | } sm3_hmac_ctx_tcxx . . $ sm3_hmac_ctx_t#; |
| 29 | |
| 30 | void sm3_hmac_initcxx . . $ `lib/crypt-port.h:426:9`! (sm3_hmac_ctx_tcxx . . $ sm3_hmac_ctx_t# * ctx, const uint8_tcxx . . $ uint8_t# * key, |
| 31 | size_t key_len); |
| 32 | void sm3_hmac_updatecxx . . $ `lib/crypt-port.h:427:9`! (sm3_hmac_ctx_tcxx . . $ sm3_hmac_ctx_t# * ctx, const uint8_tcxx . . $ uint8_t# * data, |
| 33 | size_t data_len); |
| 34 | void sm3_hmac_finalcxx . . $ `lib/crypt-port.h:425:9`! (sm3_hmac_ctx_tcxx . . $ sm3_hmac_ctx_t# * ctx, uint8_tcxx . . $ uint8_t# mac[32]); |
| 35 | void sm3_hmaccxx . . $ `lib/crypt-port.h:428:9`! (const uint8_tcxx . . $ uint8_t# * data, size_t data_len, |
| 36 | const uint8_tcxx . . $ uint8_t# * key, size_t key_len, |
| 37 | uint8_tcxx . . $ uint8_t# mac[32], sm3_hmac_ctx_tcxx . . $ sm3_hmac_ctx_t# * ctx); |
| 38 | void sm3_hmac_bufcxx . . $ `lib/crypt-port.h:424:9`! (const uint8_tcxx . . $ uint8_t# * data, size_t data_len, |
| 39 | const uint8_tcxx . . $ uint8_t# * key, size_t key_len, |
| 40 | uint8_tcxx . . $ uint8_t# mac[32]); |
| 41 | |
| 42 | #endif /* _CRYPT_ALG_SM3_HMAC_H */ |