Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:44

0001 /*
0002  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
0003  *
0004  * Licensed under the Apache License 2.0 (the "License").  You may not use
0005  * this file except in compliance with the License.  You can obtain a copy
0006  * in the file LICENSE in the source distribution or at
0007  * https://www.openssl.org/source/license.html
0008  */
0009 
0010 #ifndef OPENSSL_HMAC_H
0011 # define OPENSSL_HMAC_H
0012 # pragma once
0013 
0014 # include <openssl/macros.h>
0015 # ifndef OPENSSL_NO_DEPRECATED_3_0
0016 #  define HEADER_HMAC_H
0017 # endif
0018 
0019 # include <openssl/opensslconf.h>
0020 
0021 # include <openssl/evp.h>
0022 
0023 # ifndef OPENSSL_NO_DEPRECATED_3_0
0024 #  define HMAC_MAX_MD_CBLOCK      200    /* Deprecated */
0025 # endif
0026 
0027 # ifdef  __cplusplus
0028 extern "C" {
0029 # endif
0030 
0031 # ifndef OPENSSL_NO_DEPRECATED_3_0
0032 OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e);
0033 OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
0034 OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx);
0035 OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
0036 # endif
0037 # ifndef OPENSSL_NO_DEPRECATED_1_1_0
0038 OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx,
0039                                              const void *key, int len,
0040                                              const EVP_MD *md);
0041 # endif
0042 # ifndef OPENSSL_NO_DEPRECATED_3_0
0043 OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
0044                                        const EVP_MD *md, ENGINE *impl);
0045 OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
0046                                       size_t len);
0047 OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
0048                                      unsigned int *len);
0049 OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
0050 OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
0051 OSSL_DEPRECATEDIN_3_0 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
0052 # endif
0053 
0054 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
0055                     const unsigned char *data, size_t data_len,
0056                     unsigned char *md, unsigned int *md_len);
0057 
0058 # ifdef  __cplusplus
0059 }
0060 # endif
0061 
0062 #endif