Guardtime KSI c SDK
Loading...
Searching...
No Matches
hmac.h
Go to the documentation of this file.
1/*
2 * Copyright 2013-2015 Guardtime, Inc.
3 *
4 * This file is part of the Guardtime client SDK.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License").
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES, CONDITIONS, OR OTHER LICENSES OF ANY KIND, either
13 * express or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
15 * "Guardtime" and "KSI" are trademarks or registered trademarks of
16 * Guardtime, Inc., and no license to trademarks is granted; Guardtime
17 * reserves and retains all trademark rights.
18 */
19
20#ifndef HMAC_H
21#define HMAC_H
22
23#include "types.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
32
37 typedef struct KSI_HmacHasher_st KSI_HmacHasher;
38
50 int KSI_HMAC_create(KSI_CTX *ctx, KSI_HashAlgorithm algo_id, const char *key, const unsigned char *data, size_t data_len, KSI_DataHash **hmac);
51
64 int KSI_HmacHasher_open(KSI_CTX *ctx, KSI_HashAlgorithm algo_id, const char *key, KSI_HmacHasher **hasher);
65
74
85 int KSI_HmacHasher_add(KSI_HmacHasher *hasher, const void *data, size_t data_length);
86
96
104
105
109#ifdef __cplusplus
110}
111#endif
112
113#endif /* HMAC_H */
114
struct KSI_CTX_st KSI_CTX
Definition types_base.h:78
struct KSI_DataHash_st KSI_DataHash
Definition hash.h:52
enum KSI_HashAlgorithm_en KSI_HashAlgorithm
void KSI_HmacHasher_free(KSI_HmacHasher *hasher)
int KSI_HmacHasher_open(KSI_CTX *ctx, KSI_HashAlgorithm algo_id, const char *key, KSI_HmacHasher **hasher)
int KSI_HMAC_create(KSI_CTX *ctx, KSI_HashAlgorithm algo_id, const char *key, const unsigned char *data, size_t data_len, KSI_DataHash **hmac)
int KSI_HmacHasher_add(KSI_HmacHasher *hasher, const void *data, size_t data_length)
int KSI_HmacHasher_reset(KSI_HmacHasher *hasher)
struct KSI_HmacHasher_st KSI_HmacHasher
Definition hmac.h:37
int KSI_HmacHasher_close(KSI_HmacHasher *hasher, KSI_DataHash **hmac)