Rizin
unix-like reverse engineering framework and cli tools
sha1.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2021 deroad <wargio@libero.it>
2
// SPDX-License-Identifier: LGPL-3.0-only
3
4
#ifndef RZ_HASH_SHA1_H
5
#define RZ_HASH_SHA1_H
6
7
#include <
rz_types.h
>
8
9
#define RZ_HASH_SHA1_DIGEST_SIZE 0x14
10
#define RZ_HASH_SHA1_BLOCK_LENGTH 0x40
11
typedef
struct
sha1_context_t
{
12
ut32
digest
[5];
13
ut8
block
[
RZ_HASH_SHA1_BLOCK_LENGTH
];
14
ut64
index
;
15
ut64
len_high
;
16
ut64
len_low
;
17
}
RzSHA1
;
18
19
void
rz_sha1_init
(
RzSHA1
*
context
);
20
bool
rz_sha1_update
(
RzSHA1
*
context
,
const
ut8
*data,
ut64
length
);
21
void
rz_sha1_fini
(
ut8
*hash,
RzSHA1
*
context
);
22
23
#endif
/* RZ_HASH_SHA1_H */
length
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
Definition:
sflib.h:133
ut32
uint32_t ut32
Definition:
demangler_util.h:31
ut8
uint8_t ut8
Definition:
lh5801.h:11
rz_types.h
rz_sha1_init
void rz_sha1_init(RzSHA1 *context)
Definition:
sha1.c:9
rz_sha1_fini
void rz_sha1_fini(ut8 *hash, RzSHA1 *context)
Definition:
sha1.c:137
RZ_HASH_SHA1_BLOCK_LENGTH
#define RZ_HASH_SHA1_BLOCK_LENGTH
Definition:
sha1.h:10
rz_sha1_update
bool rz_sha1_update(RzSHA1 *context, const ut8 *data, ut64 length)
Definition:
sha1.c:88
RzSHA1
struct sha1_context_t RzSHA1
context
Definition:
zip_source_compress.c:39
sha1_context_t
Definition:
sha1.h:11
sha1_context_t::index
ut64 index
Definition:
sha1.h:14
sha1_context_t::len_high
ut64 len_high
Definition:
sha1.h:15
sha1_context_t::digest
ut32 digest[5]
Definition:
sha1.h:12
sha1_context_t::len_low
ut64 len_low
Definition:
sha1.h:16
sha1_context_t::block
ut8 block[RZ_HASH_SHA1_BLOCK_LENGTH]
Definition:
sha1.h:13
ut64
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
librz
hash
algorithms
sha1
sha1.h
Generated by
1.9.1