git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
arch
/
s390
/
crypto
/
sha1_s390.c
diff --git
a/arch/s390/crypto/sha1_s390.c
b/arch/s390/crypto/sha1_s390.c
index
9d34a35
..
98c896b
100644
(file)
--- a/
arch/s390/crypto/sha1_s390.c
+++ b/
arch/s390/crypto/sha1_s390.c
@@
-40,29
+40,28
@@
struct crypt_s390_sha1_ctx {
u8 buffer[2 * SHA1_BLOCK_SIZE];
};
u8 buffer[2 * SHA1_BLOCK_SIZE];
};
-static void sha1_init(struct crypto_tfm *tfm)
+static void
+sha1_init(void *ctx)
{
{
- struct crypt_s390_sha1_ctx *ctx = crypto_tfm_ctx(tfm);
- static const u32 initstate[5] = {
- 0x67452301,
- 0xEFCDAB89,
- 0x98BADCFE,
- 0x10325476,
- 0xC3D2E1F0
+ static const struct crypt_s390_sha1_ctx initstate = {
+ .state = {
+ 0x67452301,
+ 0xEFCDAB89,
+ 0x98BADCFE,
+ 0x10325476,
+ 0xC3D2E1F0
+ },
};
};
-
- ctx->count = 0;
- memcpy(ctx->state, &initstate, sizeof(initstate));
- ctx->buf_len = 0;
+ memcpy(ctx, &initstate, sizeof(initstate));
}
}
-static void
sha1_update(struct crypto_tfm *tfm, const u8 *data,
-
unsigned int len)
+static void
+
sha1_update(void *ctx, const u8 *data,
unsigned int len)
{
struct crypt_s390_sha1_ctx *sctx;
long imd_len;
{
struct crypt_s390_sha1_ctx *sctx;
long imd_len;
- sctx = c
rypto_tfm_ctx(tfm)
;
+ sctx = c
tx
;
sctx->count += len * 8; //message bit length
//anything in buffer yet? -> must be completed
sctx->count += len * 8; //message bit length
//anything in buffer yet? -> must be completed
@@
-111,9
+110,10
@@
pad_message(struct crypt_s390_sha1_ctx* sctx)
}
/* Add padding and return the message digest. */
}
/* Add padding and return the message digest. */
-static void sha1_final(struct crypto_tfm *tfm, u8 *out)
+static void
+sha1_final(void* ctx, u8 *out)
{
{
- struct crypt_s390_sha1_ctx *sctx = c
rypto_tfm_ctx(tfm)
;
+ struct crypt_s390_sha1_ctx *sctx = c
tx
;
//must perform manual padding
pad_message(sctx);
//must perform manual padding
pad_message(sctx);