Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bind9/isc
File: hmacsha.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
[11] Fix | Delete
/*! \file isc/hmacsha.h
[12] Fix | Delete
* This is the header file for the HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
[13] Fix | Delete
* HMAC-SHA334 and HMAC-SHA512 hash algorithm described in RFC 2104.
[14] Fix | Delete
*/
[15] Fix | Delete
[16] Fix | Delete
#ifndef ISC_HMACSHA_H
[17] Fix | Delete
#define ISC_HMACSHA_H 1
[18] Fix | Delete
[19] Fix | Delete
#include <stdbool.h>
[20] Fix | Delete
[21] Fix | Delete
#include <isc/lang.h>
[22] Fix | Delete
#include <isc/platform.h>
[23] Fix | Delete
#include <isc/sha1.h>
[24] Fix | Delete
#include <isc/sha2.h>
[25] Fix | Delete
#include <isc/types.h>
[26] Fix | Delete
[27] Fix | Delete
#define ISC_HMACSHA1_KEYLENGTH ISC_SHA1_BLOCK_LENGTH
[28] Fix | Delete
#define ISC_HMACSHA224_KEYLENGTH ISC_SHA224_BLOCK_LENGTH
[29] Fix | Delete
#define ISC_HMACSHA256_KEYLENGTH ISC_SHA256_BLOCK_LENGTH
[30] Fix | Delete
#define ISC_HMACSHA384_KEYLENGTH ISC_SHA384_BLOCK_LENGTH
[31] Fix | Delete
#define ISC_HMACSHA512_KEYLENGTH ISC_SHA512_BLOCK_LENGTH
[32] Fix | Delete
[33] Fix | Delete
#ifdef ISC_PLATFORM_OPENSSLHASH
[34] Fix | Delete
#include <openssl/opensslv.h>
[35] Fix | Delete
#include <openssl/hmac.h>
[36] Fix | Delete
[37] Fix | Delete
typedef struct {
[38] Fix | Delete
HMAC_CTX *ctx;
[39] Fix | Delete
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
[40] Fix | Delete
HMAC_CTX _ctx;
[41] Fix | Delete
#endif
[42] Fix | Delete
} isc_hmacsha_t;
[43] Fix | Delete
[44] Fix | Delete
typedef isc_hmacsha_t isc_hmacsha1_t;
[45] Fix | Delete
typedef isc_hmacsha_t isc_hmacsha224_t;
[46] Fix | Delete
typedef isc_hmacsha_t isc_hmacsha256_t;
[47] Fix | Delete
typedef isc_hmacsha_t isc_hmacsha384_t;
[48] Fix | Delete
typedef isc_hmacsha_t isc_hmacsha512_t;
[49] Fix | Delete
[50] Fix | Delete
#elif PKCS11CRYPTO
[51] Fix | Delete
#include <pk11/pk11.h>
[52] Fix | Delete
[53] Fix | Delete
typedef pk11_context_t isc_hmacsha1_t;
[54] Fix | Delete
typedef pk11_context_t isc_hmacsha224_t;
[55] Fix | Delete
typedef pk11_context_t isc_hmacsha256_t;
[56] Fix | Delete
typedef pk11_context_t isc_hmacsha384_t;
[57] Fix | Delete
typedef pk11_context_t isc_hmacsha512_t;
[58] Fix | Delete
[59] Fix | Delete
#else
[60] Fix | Delete
[61] Fix | Delete
typedef struct {
[62] Fix | Delete
isc_sha1_t sha1ctx;
[63] Fix | Delete
unsigned char key[ISC_HMACSHA1_KEYLENGTH];
[64] Fix | Delete
} isc_hmacsha1_t;
[65] Fix | Delete
[66] Fix | Delete
typedef struct {
[67] Fix | Delete
isc_sha224_t sha224ctx;
[68] Fix | Delete
unsigned char key[ISC_HMACSHA224_KEYLENGTH];
[69] Fix | Delete
} isc_hmacsha224_t;
[70] Fix | Delete
[71] Fix | Delete
typedef struct {
[72] Fix | Delete
isc_sha256_t sha256ctx;
[73] Fix | Delete
unsigned char key[ISC_HMACSHA256_KEYLENGTH];
[74] Fix | Delete
} isc_hmacsha256_t;
[75] Fix | Delete
[76] Fix | Delete
typedef struct {
[77] Fix | Delete
isc_sha384_t sha384ctx;
[78] Fix | Delete
unsigned char key[ISC_HMACSHA384_KEYLENGTH];
[79] Fix | Delete
} isc_hmacsha384_t;
[80] Fix | Delete
[81] Fix | Delete
typedef struct {
[82] Fix | Delete
isc_sha512_t sha512ctx;
[83] Fix | Delete
unsigned char key[ISC_HMACSHA512_KEYLENGTH];
[84] Fix | Delete
} isc_hmacsha512_t;
[85] Fix | Delete
#endif
[86] Fix | Delete
[87] Fix | Delete
ISC_LANG_BEGINDECLS
[88] Fix | Delete
[89] Fix | Delete
void
[90] Fix | Delete
isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
[91] Fix | Delete
unsigned int len);
[92] Fix | Delete
[93] Fix | Delete
void
[94] Fix | Delete
isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx);
[95] Fix | Delete
[96] Fix | Delete
void
[97] Fix | Delete
isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
[98] Fix | Delete
unsigned int len);
[99] Fix | Delete
[100] Fix | Delete
void
[101] Fix | Delete
isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
[102] Fix | Delete
[103] Fix | Delete
bool
[104] Fix | Delete
isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
[105] Fix | Delete
[106] Fix | Delete
bool
[107] Fix | Delete
isc_hmacsha1_check(int testing);
[108] Fix | Delete
[109] Fix | Delete
[110] Fix | Delete
void
[111] Fix | Delete
isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
[112] Fix | Delete
unsigned int len);
[113] Fix | Delete
[114] Fix | Delete
void
[115] Fix | Delete
isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx);
[116] Fix | Delete
[117] Fix | Delete
void
[118] Fix | Delete
isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
[119] Fix | Delete
unsigned int len);
[120] Fix | Delete
[121] Fix | Delete
void
[122] Fix | Delete
isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
[123] Fix | Delete
[124] Fix | Delete
bool
[125] Fix | Delete
isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
[126] Fix | Delete
[127] Fix | Delete
[128] Fix | Delete
void
[129] Fix | Delete
isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
[130] Fix | Delete
unsigned int len);
[131] Fix | Delete
[132] Fix | Delete
void
[133] Fix | Delete
isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx);
[134] Fix | Delete
[135] Fix | Delete
void
[136] Fix | Delete
isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
[137] Fix | Delete
unsigned int len);
[138] Fix | Delete
[139] Fix | Delete
void
[140] Fix | Delete
isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
[141] Fix | Delete
[142] Fix | Delete
bool
[143] Fix | Delete
isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
[144] Fix | Delete
[145] Fix | Delete
[146] Fix | Delete
void
[147] Fix | Delete
isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
[148] Fix | Delete
unsigned int len);
[149] Fix | Delete
[150] Fix | Delete
void
[151] Fix | Delete
isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx);
[152] Fix | Delete
[153] Fix | Delete
void
[154] Fix | Delete
isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
[155] Fix | Delete
unsigned int len);
[156] Fix | Delete
[157] Fix | Delete
void
[158] Fix | Delete
isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
[159] Fix | Delete
[160] Fix | Delete
bool
[161] Fix | Delete
isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
[162] Fix | Delete
[163] Fix | Delete
[164] Fix | Delete
void
[165] Fix | Delete
isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
[166] Fix | Delete
unsigned int len);
[167] Fix | Delete
[168] Fix | Delete
void
[169] Fix | Delete
isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx);
[170] Fix | Delete
[171] Fix | Delete
void
[172] Fix | Delete
isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
[173] Fix | Delete
unsigned int len);
[174] Fix | Delete
[175] Fix | Delete
void
[176] Fix | Delete
isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
[177] Fix | Delete
[178] Fix | Delete
bool
[179] Fix | Delete
isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
[180] Fix | Delete
[181] Fix | Delete
ISC_LANG_ENDDECLS
[182] Fix | Delete
[183] Fix | Delete
#endif /* ISC_HMACSHA_H */
[184] Fix | Delete
[185] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function