mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-23 15:09:48 +00:00
codecheck
Signed-off-by: lixiyuan <lixiyuan7@huawei.com>
This commit is contained in:
parent
081f074307
commit
11b35bd8b0
@ -116,22 +116,22 @@ void MtpFsSha::Transform(uint64 block[BLOCK_BYTES])
|
||||
|
||||
#define rol(value, bits) (((value) << (bits)) | (((value)&0xffffffff) >> (BIT_OFFSET - (bits))))
|
||||
#define blk(i) \
|
||||
(block[(i) & 15] = rol(block[(i + 13) & 15] ^ block[(i + 8) & 15] ^ block[(i + 2) & 15] ^ block[i & 15], 1))
|
||||
(block[i & 15] = rol(block[(i + 13) & 15] ^ block[(i + 8) & 15] ^ block[(i + 2) & 15] ^ block[i & 15], 1))
|
||||
|
||||
#define R0(v, w, x, y, z, i) \
|
||||
z += (((w) & ((x) ^ (y))) ^ (y)) + block[i] + 0x5a827999 + rol(v, 5); \
|
||||
z += (((w) & ((x) ^ (y))) ^ (y)) + block[i] + 0x5a827999 + rol((v), 5); \
|
||||
w = rol((w), 30)
|
||||
#define R1(v, w, x, y, z, i) \
|
||||
z += (((w) & ((x) ^ (y))) ^ (y)) + blk(i) + 0x5a827999 + rol(v, 5); \
|
||||
#define R1(v, w, x, y, z, i) \
|
||||
z += (((w) & ((x) ^ (y))) ^ (y)) + blk(i) + 0x5a827999 + rol((v), 5); \
|
||||
w = rol((w), 30)
|
||||
#define R2(v, w, x, y, z, i) \
|
||||
z += ((w) ^ (x) ^ (y)) + blk(i) + 0x6ed9eba1 + rol(v, 5); \
|
||||
#define R2(v, w, x, y, z, i) \
|
||||
z += ((w) ^ (x) ^ (y)) + blk(i) + 0x6ed9eba1 + rol((v), 5); \
|
||||
w = rol((w), 30)
|
||||
#define R3(v, w, x, y, z, i) \
|
||||
z += ((((w) | (x)) & (y)) | ((w) & (x))) + blk(i) + 0x8f1bbcdc + rol(v, 5); \
|
||||
#define R3(v, w, x, y, z, i) \
|
||||
z += ((((w) | (x)) & (y)) | ((w) & (x))) + blk(i) + 0x8f1bbcdc + rol((v), 5); \
|
||||
w = rol((w), 30)
|
||||
#define R4(v, w, x, y, z, i) \
|
||||
z += ((w) ^ (x) ^ (y)) + blk(i) + 0xca62c1d6 + rol(v, 5); \
|
||||
#define R4(v, w, x, y, z, i) \
|
||||
z += ((w) ^ (x) ^ (y)) + blk(i) + 0xca62c1d6 + rol((v), 5); \
|
||||
w = rol((w), 30)
|
||||
|
||||
R0(a, b, c, d, e, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user