• Home
  • Raw
  • Download

Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:z

1 // SPDX-License-Identifier: GPL-2.0
13 #define DELTA 0x9E3779B9
17 __u32 sum = 0; in TEA_transform()
18 __u32 b0 = buf[0], b1 = buf[1]; in TEA_transform()
19 __u32 a = in[0], b = in[1], c = in[2], d = in[3]; in TEA_transform() local
24 b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b); in TEA_transform()
26 } while (--n); in TEA_transform()
28 buf[0] += b0; in TEA_transform()
33 #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) argument
34 #define G(x, y, z) (((x) & (y)) + (((x) ^ (y)) & (z))) argument
35 #define H(x, y, z) ((x) ^ (y) ^ (z)) argument
43 #define ROUND(f, a, b, c, d, x, s) \ argument
44 (a += f(b, c, d) + x, a = rol32(a, s))
45 #define K1 0
50 * Basic cut-down MD4 transform. Returns only 32 bits of result.
54 __u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; in half_md4_transform() local
57 ROUND(F, a, b, c, d, in[0] + K1, 3); in half_md4_transform()
58 ROUND(F, d, a, b, c, in[1] + K1, 7); in half_md4_transform()
59 ROUND(F, c, d, a, b, in[2] + K1, 11); in half_md4_transform()
60 ROUND(F, b, c, d, a, in[3] + K1, 19); in half_md4_transform()
61 ROUND(F, a, b, c, d, in[4] + K1, 3); in half_md4_transform()
62 ROUND(F, d, a, b, c, in[5] + K1, 7); in half_md4_transform()
63 ROUND(F, c, d, a, b, in[6] + K1, 11); in half_md4_transform()
64 ROUND(F, b, c, d, a, in[7] + K1, 19); in half_md4_transform()
67 ROUND(G, a, b, c, d, in[1] + K2, 3); in half_md4_transform()
68 ROUND(G, d, a, b, c, in[3] + K2, 5); in half_md4_transform()
69 ROUND(G, c, d, a, b, in[5] + K2, 9); in half_md4_transform()
70 ROUND(G, b, c, d, a, in[7] + K2, 13); in half_md4_transform()
71 ROUND(G, a, b, c, d, in[0] + K2, 3); in half_md4_transform()
72 ROUND(G, d, a, b, c, in[2] + K2, 5); in half_md4_transform()
73 ROUND(G, c, d, a, b, in[4] + K2, 9); in half_md4_transform()
74 ROUND(G, b, c, d, a, in[6] + K2, 13); in half_md4_transform()
77 ROUND(H, a, b, c, d, in[3] + K3, 3); in half_md4_transform()
78 ROUND(H, d, a, b, c, in[7] + K3, 9); in half_md4_transform()
79 ROUND(H, c, d, a, b, in[2] + K3, 11); in half_md4_transform()
80 ROUND(H, b, c, d, a, in[6] + K3, 15); in half_md4_transform()
81 ROUND(H, a, b, c, d, in[1] + K3, 3); in half_md4_transform()
82 ROUND(H, d, a, b, c, in[5] + K3, 9); in half_md4_transform()
83 ROUND(H, c, d, a, b, in[0] + K3, 11); in half_md4_transform()
84 ROUND(H, b, c, d, a, in[4] + K3, 15); in half_md4_transform()
86 buf[0] += a; in half_md4_transform()
104 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_unsigned()
107 while (len--) { in dx_hack_hash_unsigned()
110 if (hash & 0x80000000) in dx_hack_hash_unsigned()
111 hash -= 0x7fffffff; in dx_hack_hash_unsigned()
120 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_signed()
123 while (len--) { in dx_hack_hash_signed()
126 if (hash & 0x80000000) in dx_hack_hash_signed()
127 hash -= 0x7fffffff; in dx_hack_hash_signed()
146 for (i = 0; i < len; i++) { in str2hashbuf_signed()
151 num--; in str2hashbuf_signed()
154 if (--num >= 0) in str2hashbuf_signed()
156 while (--num >= 0) in str2hashbuf_signed()
172 for (i = 0; i < len; i++) { in str2hashbuf_unsigned()
177 num--; in str2hashbuf_unsigned()
180 if (--num >= 0) in str2hashbuf_unsigned()
182 while (--num >= 0) in str2hashbuf_unsigned()
187 * Returns the hash of a filename. If len is 0 and name is NULL, then
188 * this function can be used to test whether or not a hash version is
192 * uniquify a hash. If the seed is all zero's, then some default seed
195 * A particular hash version specifies whether or not the seed is
197 * bits. 32 bit hashes will return 0 for the minor hash.
202 __u32 minor_hash = 0; in ext4fs_dirhash()
210 buf[0] = 0x67452301; in ext4fs_dirhash()
211 buf[1] = 0xefcdab89; in ext4fs_dirhash()
212 buf[2] = 0x98badcfe; in ext4fs_dirhash()
213 buf[3] = 0x10325476; in ext4fs_dirhash()
216 if (hinfo->seed) { in ext4fs_dirhash()
217 for (i = 0; i < 4; i++) { in ext4fs_dirhash()
218 if (hinfo->seed[i]) { in ext4fs_dirhash()
219 memcpy(buf, hinfo->seed, sizeof(buf)); in ext4fs_dirhash()
225 switch (hinfo->hash_version) { in ext4fs_dirhash()
236 while (len > 0) { in ext4fs_dirhash()
239 len -= 32; in ext4fs_dirhash()
249 while (len > 0) { in ext4fs_dirhash()
252 len -= 16; in ext4fs_dirhash()
255 hash = buf[0]; in ext4fs_dirhash()
259 hinfo->hash = 0; in ext4fs_dirhash()
260 return -1; in ext4fs_dirhash()
264 hash = (EXT4_HTREE_EOF_32BIT - 1) << 1; in ext4fs_dirhash()
265 hinfo->hash = hash; in ext4fs_dirhash()
266 hinfo->minor_hash = minor_hash; in ext4fs_dirhash()
267 return 0; in ext4fs_dirhash()