Lines Matching +full:a +full:- +full:h
1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/fs.h>
9 #include <linux/unicode.h>
10 #include <linux/compiler.h>
11 #include <linux/bitops.h>
12 #include "ext4.h"
20 __u32 a = in[0], b = in[1], c = in[2], d = in[3]; in TEA_transform() local
25 b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b); in TEA_transform()
27 } while (--n); in TEA_transform()
33 /* F, G and H are basic MD4 functions: selection, majority, parity */
36 #define H(x, y, z) ((x) ^ (y) ^ (z)) macro
44 #define ROUND(f, a, b, c, d, x, s) \ argument
45 (a += f(b, c, d) + x, a = rol32(a, s))
51 * Basic cut-down MD4 transform. Returns only 32 bits of result.
55 __u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; in half_md4_transform() local
58 ROUND(F, a, b, c, d, in[0] + K1, 3); in half_md4_transform()
59 ROUND(F, d, a, b, c, in[1] + K1, 7); in half_md4_transform()
60 ROUND(F, c, d, a, b, in[2] + K1, 11); in half_md4_transform()
61 ROUND(F, b, c, d, a, in[3] + K1, 19); in half_md4_transform()
62 ROUND(F, a, b, c, d, in[4] + K1, 3); in half_md4_transform()
63 ROUND(F, d, a, b, c, in[5] + K1, 7); in half_md4_transform()
64 ROUND(F, c, d, a, b, in[6] + K1, 11); in half_md4_transform()
65 ROUND(F, b, c, d, a, in[7] + K1, 19); in half_md4_transform()
68 ROUND(G, a, b, c, d, in[1] + K2, 3); in half_md4_transform()
69 ROUND(G, d, a, b, c, in[3] + K2, 5); in half_md4_transform()
70 ROUND(G, c, d, a, b, in[5] + K2, 9); in half_md4_transform()
71 ROUND(G, b, c, d, a, in[7] + K2, 13); in half_md4_transform()
72 ROUND(G, a, b, c, d, in[0] + K2, 3); in half_md4_transform()
73 ROUND(G, d, a, b, c, in[2] + K2, 5); in half_md4_transform()
74 ROUND(G, c, d, a, b, in[4] + K2, 9); in half_md4_transform()
75 ROUND(G, b, c, d, a, in[6] + K2, 13); in half_md4_transform()
78 ROUND(H, a, b, c, d, in[3] + K3, 3); in half_md4_transform()
79 ROUND(H, d, a, b, c, in[7] + K3, 9); in half_md4_transform()
80 ROUND(H, c, d, a, b, in[2] + K3, 11); in half_md4_transform()
81 ROUND(H, b, c, d, a, in[6] + K3, 15); in half_md4_transform()
82 ROUND(H, a, b, c, d, in[1] + K3, 3); in half_md4_transform()
83 ROUND(H, d, a, b, c, in[5] + K3, 9); in half_md4_transform()
84 ROUND(H, c, d, a, b, in[0] + K3, 11); in half_md4_transform()
85 ROUND(H, b, c, d, a, in[4] + K3, 15); in half_md4_transform()
87 buf[0] += a; in half_md4_transform()
100 #undef H
108 while (len--) { in dx_hack_hash_unsigned()
112 hash -= 0x7fffffff; in dx_hack_hash_unsigned()
124 while (len--) { in dx_hack_hash_signed()
128 hash -= 0x7fffffff; in dx_hack_hash_signed()
152 num--; in str2hashbuf_signed()
155 if (--num >= 0) in str2hashbuf_signed()
157 while (--num >= 0) in str2hashbuf_signed()
178 num--; in str2hashbuf_unsigned()
181 if (--num >= 0) in str2hashbuf_unsigned()
183 while (--num >= 0) in str2hashbuf_unsigned()
188 * Returns the hash of a filename. If len is 0 and name is NULL, then
189 * this function can be used to test whether or not a hash version is
193 * uniquify a hash. If the seed is all zero's, then some default seed
196 * A particular hash version specifies whether or not the seed is
218 if (hinfo->seed) { in __ext4fs_dirhash()
220 if (hinfo->seed[i]) { in __ext4fs_dirhash()
221 memcpy(buf, hinfo->seed, sizeof(buf)); in __ext4fs_dirhash()
227 switch (hinfo->hash_version) { in __ext4fs_dirhash()
242 len -= 32; in __ext4fs_dirhash()
256 len -= 16; in __ext4fs_dirhash()
271 return -1; in __ext4fs_dirhash()
279 hinfo->hash = 0; in __ext4fs_dirhash()
280 hinfo->minor_hash = 0; in __ext4fs_dirhash()
281 ext4_warning(dir->i_sb, in __ext4fs_dirhash()
283 hinfo->hash_version); in __ext4fs_dirhash()
284 return -EINVAL; in __ext4fs_dirhash()
288 hash = (EXT4_HTREE_EOF_32BIT - 1) << 1; in __ext4fs_dirhash()
289 hinfo->hash = hash; in __ext4fs_dirhash()
290 hinfo->minor_hash = minor_hash; in __ext4fs_dirhash()
298 const struct unicode_map *um = dir->i_sb->s_encoding; in ext4fs_dirhash()
307 return -ENOMEM; in ext4fs_dirhash()