rpm 4.19.1.1 The RPM Package Manager

Loading...
Searching...
No Matches
rpmcrypto.h
1#ifndef _RPMCRYPTO_H
2#define _RPMCRYPTO_H
3
4#include <rpm/rpmtypes.h>
5
6#ifdef __cplusplus
7 extern "C" {
8#endif
9
12 typedef struct DIGEST_CTX_s * DIGEST_CTX;
13 typedef struct rpmDigestBundle_s * rpmDigestBundle;
14
19 typedef enum rpmHashAlgo_e {
20 RPM_HASH_MD5 = 1,
21 RPM_HASH_SHA1 = 2,
22 RPM_HASH_RIPEMD160 = 3,
23 RPM_HASH_MD2 = 5,
24 RPM_HASH_TIGER192 = 6,
25 RPM_HASH_HAVAL_5_160 = 7,
26 RPM_HASH_SHA256 = 8,
27 RPM_HASH_SHA384 = 9,
28 RPM_HASH_SHA512 = 10,
29 RPM_HASH_SHA224 = 11,
30} rpmHashAlgo;
31
35 enum rpmDigestFlags_e {
36 RPMDIGEST_NONE = 0
37};
38
39 typedef rpmFlags rpmDigestFlags;
40
48 int rpmInitCrypto(void);
49
53 int rpmFreeCrypto(void);
54
60DIGEST_CTX rpmDigestDup(DIGEST_CTX octx);
61
67 size_t rpmDigestLength(int hashalgo);
68
76DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags);
77
85 int rpmDigestUpdate(DIGEST_CTX ctx, const void * data, size_t len);
86
98 int rpmDigestFinal(DIGEST_CTX ctx, void ** datap, size_t * lenp, int asAscii);
99
104rpmDigestBundle rpmDigestBundleNew(void);
105
111rpmDigestBundle rpmDigestBundleFree(rpmDigestBundle bundle);
112
121 int rpmDigestBundleAdd(rpmDigestBundle bundle, int algo,
122 rpmDigestFlags flags);
123
132 int rpmDigestBundleAddID(rpmDigestBundle bundle, int algo, int id,
133 rpmDigestFlags flags);
134
142 int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t len);
143
154 int rpmDigestBundleFinal(rpmDigestBundle bundle, int id,
155 void ** datap, size_t * lenp, int asAscii);
156
163DIGEST_CTX rpmDigestBundleDupCtx(rpmDigestBundle bundle, int id);
164
165
166#ifdef __cplusplus
167}
168#endif
169
170#endif /* _RPMCRYPTO_H */
rpmInitCrypto
int rpmInitCrypto(void)
rpmDigestBundleFree
rpmDigestBundle rpmDigestBundleFree(rpmDigestBundle bundle)
rpmDigestFlags_e
rpmDigestFlags_e
Definition rpmcrypto.h:35
rpmDigestInit
DIGEST_CTX rpmDigestInit(int hashalgo, rpmDigestFlags flags)
rpmDigestBundleAdd
int rpmDigestBundleAdd(rpmDigestBundle bundle, int algo, rpmDigestFlags flags)
rpmHashAlgo_e
rpmHashAlgo_e
Definition rpmcrypto.h:19
rpmDigestFinal
int rpmDigestFinal(DIGEST_CTX ctx, void **datap, size_t *lenp, int asAscii)
rpmDigestBundleNew
rpmDigestBundle rpmDigestBundleNew(void)
rpmDigestBundleFinal
int rpmDigestBundleFinal(rpmDigestBundle bundle, int id, void **datap, size_t *lenp, int asAscii)
rpmDigestDup
DIGEST_CTX rpmDigestDup(DIGEST_CTX octx)
rpmHashAlgo
enum rpmHashAlgo_e rpmHashAlgo
rpmDigestLength
size_t rpmDigestLength(int hashalgo)
rpmDigestBundleDupCtx
DIGEST_CTX rpmDigestBundleDupCtx(rpmDigestBundle bundle, int id)
rpmDigestUpdate
int rpmDigestUpdate(DIGEST_CTX ctx, const void *data, size_t len)
rpmFreeCrypto
int rpmFreeCrypto(void)
rpmDigestBundleAddID
int rpmDigestBundleAddID(rpmDigestBundle bundle, int algo, int id, rpmDigestFlags flags)
rpmDigestBundleUpdate
int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t len)
RPM_HASH_SHA256
@ RPM_HASH_SHA256
Definition rpmcrypto.h:26
RPM_HASH_SHA512
@ RPM_HASH_SHA512
Definition rpmcrypto.h:28
RPM_HASH_MD2
@ RPM_HASH_MD2
Definition rpmcrypto.h:23
RPM_HASH_TIGER192
@ RPM_HASH_TIGER192
Definition rpmcrypto.h:24
RPM_HASH_SHA224
@ RPM_HASH_SHA224
Definition rpmcrypto.h:29
RPM_HASH_HAVAL_5_160
@ RPM_HASH_HAVAL_5_160
Definition rpmcrypto.h:25
RPM_HASH_RIPEMD160
@ RPM_HASH_RIPEMD160
Definition rpmcrypto.h:22
RPM_HASH_SHA384
@ RPM_HASH_SHA384
Definition rpmcrypto.h:27
RPM_HASH_MD5
@ RPM_HASH_MD5
Definition rpmcrypto.h:20
RPM_HASH_SHA1
@ RPM_HASH_SHA1
Definition rpmcrypto.h:21
rpmtypes.h