summaryrefslogtreecommitdiff
path: root/rpmio/rpmio_internal.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-07-21 19:44:22 +0000
committerjbj <devnull@localhost>2001-07-21 19:44:22 +0000
commit7723beeaf4948e03de652d30a5a38d77670bc623 (patch)
tree2b8afa3067341f9e8d84b1ed2fe8a3f029ddfd3e /rpmio/rpmio_internal.h
parent74ce2b5c67fc4c4b6eb36825ea09860c3c8fd7fd (diff)
downloadrpm-7723beeaf4948e03de652d30a5a38d77670bc623.tar.gz
rpm-7723beeaf4948e03de652d30a5a38d77670bc623.tar.bz2
rpm-7723beeaf4948e03de652d30a5a38d77670bc623.zip
- add sha1 test vectors, verify on ix86/alpha/sparc.
- add (but disable for now) rpm-perl subpackage from Perl-RPM. - python: parameterize with PYVER to handle 1.5 and/or 2.1 builds. - add build dependency on zlib-devel (#49575). CVS patchset: 4969 CVS date: 2001/07/21 19:44:22
Diffstat (limited to 'rpmio/rpmio_internal.h')
-rw-r--r--rpmio/rpmio_internal.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
index 05cae0515..eae24d477 100644
--- a/rpmio/rpmio_internal.h
+++ b/rpmio/rpmio_internal.h
@@ -54,7 +54,8 @@ typedef /*@abstract@*/ struct {
typedef enum rpmDigestFlags_e {
RPMDIGEST_MD5 = (1 << 0), /*!< MD5 digest. */
RPMDIGEST_SHA1 = (1 << 1), /*!< SHA1 digest. */
- RPMDIGEST_NATIVE = (1 << 16), /*!< Should bytes be reversed? */
+ RPMDIGEST_REVERSE = (1 << 16), /*!< Should bytes be reversed? */
+ RPMDIGEST_BCSWAP = (1 << 17), /*!< Should bit count be reversed? */
} rpmDigestFlags;
typedef /*@abstract@*/ struct DIGEST_CTX_s * DIGEST_CTX;
@@ -417,7 +418,7 @@ FD_t c2f(/*@null@*/ void * cookie)
void fdInitMD5(FD_t fd, int flags)
/*@modifies fd @*/
{
- if (flags) flags = RPMDIGEST_NATIVE;
+ if (flags) flags = RPMDIGEST_REVERSE;
flags |= RPMDIGEST_MD5;
fd->digest = rpmDigestInit(flags);
}
@@ -425,10 +426,12 @@ void fdInitMD5(FD_t fd, int flags)
/** \ingroup rpmio
*/
/*@unused@*/ static inline
-void fdInitSHA1(FD_t fd)
+void fdInitSHA1(FD_t fd, int flags)
/*@modifies fd @*/
{
- fd->digest = rpmDigestInit(RPMDIGEST_SHA1);
+ if (flags) flags = RPMDIGEST_REVERSE;
+ flags |= RPMDIGEST_SHA1;
+ fd->digest = rpmDigestInit(flags);
}
/** \ingroup rpmio