42 lines
1.0 KiB
C
Raw Normal View History

2020-03-02 16:50:34 +00:00
/*
* Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved.
*
2020-03-02 17:19:21 +00:00
* Licensed under the OpenSSL license (the "License"). You may not use
2020-03-02 16:50:34 +00:00
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
2020-03-02 17:19:21 +00:00
#ifndef HEADER_CMAC_H
# define HEADER_CMAC_H
2020-03-02 16:50:34 +00:00
# ifndef OPENSSL_NO_CMAC
2020-03-02 17:19:21 +00:00
#ifdef __cplusplus
2020-03-02 16:50:34 +00:00
extern "C" {
2020-03-02 17:19:21 +00:00
#endif
2020-03-02 16:50:34 +00:00
2020-03-02 17:19:21 +00:00
# include <openssl/evp.h>
2020-03-02 16:50:34 +00:00
/* Opaque */
typedef struct CMAC_CTX_st CMAC_CTX;
2020-03-02 17:19:21 +00:00
CMAC_CTX *CMAC_CTX_new(void);
void CMAC_CTX_cleanup(CMAC_CTX *ctx);
void CMAC_CTX_free(CMAC_CTX *ctx);
EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
const EVP_CIPHER *cipher, ENGINE *impl);
int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen);
int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen);
int CMAC_resume(CMAC_CTX *ctx);
#ifdef __cplusplus
2020-03-02 16:50:34 +00:00
}
2020-03-02 17:19:21 +00:00
#endif
2020-03-02 16:50:34 +00:00
# endif
#endif