72#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
73# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
76#ifndef PLIBSYS_HEADER_PCRYPTOHASH_H
77#define PLIBSYS_HEADER_PCRYPTOHASH_H
struct PCryptoHash_ PCryptoHash
Opaque data structure for handling a cryptographic hash context.
P_LIB_API void p_crypto_hash_reset(PCryptoHash *hash)
Resets a hash state.
P_LIB_API pchar * p_crypto_hash_get_string(PCryptoHash *hash)
Gets a hash in a hexidemical representation.
P_LIB_API PCryptoHashType p_crypto_hash_get_type(const PCryptoHash *hash)
Gets a hash function type.
P_LIB_API pssize p_crypto_hash_get_length(const PCryptoHash *hash)
Gets a hash digest length depending on its type.
P_LIB_API PCryptoHash * p_crypto_hash_new(PCryptoHashType type)
Initializes a new PCryptoHash context.
enum PCryptoHashType_ PCryptoHashType
Cryptographic hash function types for PCryptoHash.
P_LIB_API void p_crypto_hash_update(PCryptoHash *hash, const puchar *data, psize len)
Adds a new chunk of data for hashing.
P_LIB_API void p_crypto_hash_free(PCryptoHash *hash)
Frees a previously initialized hash context.
P_LIB_API void p_crypto_hash_get_digest(PCryptoHash *hash, puchar *buf, psize *len)
Gets a hash in a raw representation.
PCryptoHashType_
Cryptographic hash function types for PCryptoHash.
@ P_CRYPTO_HASH_TYPE_MD5
MD5 hash function.
@ P_CRYPTO_HASH_TYPE_SHA3_224
SHA-2/224 hash function.
@ P_CRYPTO_HASH_TYPE_SHA2_256
SHA-2/256 hash function.
@ P_CRYPTO_HASH_TYPE_SHA1
SHA-1 hash function.
@ P_CRYPTO_HASH_TYPE_SHA3_256
SHA-2/256 hash function.
@ P_CRYPTO_HASH_TYPE_SHA2_384
SHA-2/384 hash function.
@ P_CRYPTO_HASH_TYPE_SHA3_512
SHA-3/512 hash function.
@ P_CRYPTO_HASH_TYPE_SHA2_224
SHA-2/224 hash function.
@ P_CRYPTO_HASH_TYPE_SHA3_384
SHA-2/384 hash function.
@ P_CRYPTO_HASH_TYPE_GOST
GOST (R 34.11-94) hash function.
@ P_CRYPTO_HASH_TYPE_SHA2_512
SHA-2/512 hash function.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
#define P_LIB_API
Exports a symbol from a shared library.
signed int pssize
Type for a platform independent signed size_t.
char pchar
Type for a char.
unsigned int psize
Type for a platform independent size_t.
unsigned char puchar
Type for an unsigned char.