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