feat: refactor onboarding into a multi-step flow with dedicated routes and session state management
This commit is contained in:
@@ -52,9 +52,9 @@ function md5(string: string) {
|
||||
let c = 0x98badcfe;
|
||||
let d = 0x10325476;
|
||||
const s = [
|
||||
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14,
|
||||
20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10,
|
||||
15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
|
||||
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9,
|
||||
14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21,
|
||||
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
|
||||
];
|
||||
|
||||
const str = unescape(encodeURIComponent(string));
|
||||
@@ -69,7 +69,7 @@ function md5(string: string) {
|
||||
words[wordLen * 16 - 2] = len * 8;
|
||||
|
||||
for (let i = 0; i < words.length; i += 16) {
|
||||
let [aa, bb, cc, dd] = [a, b, c, d];
|
||||
const [aa, bb, cc, dd] = [a, b, c, d];
|
||||
for (let j = 0; j < 64; j++) {
|
||||
let f: number;
|
||||
let g: number;
|
||||
@@ -91,7 +91,8 @@ function md5(string: string) {
|
||||
c = b;
|
||||
b =
|
||||
(b +
|
||||
((a + f + k[j] + words[i + g]) << s[j] | (a + f + k[j] + words[i + g]) >>> (32 - s[j]))) |
|
||||
(((a + f + k[j] + words[i + g]) << s[j]) |
|
||||
((a + f + k[j] + words[i + g]) >>> (32 - s[j])))) |
|
||||
0;
|
||||
a = temp;
|
||||
}
|
||||
@@ -103,9 +104,9 @@ function md5(string: string) {
|
||||
|
||||
return [a, b, c, d]
|
||||
.map((v) =>
|
||||
Array.from({ length: 4 }, (_, i) => ((v >> (i * 8)) & 0xff).toString(16).padStart(2, '0')).join(
|
||||
''
|
||||
)
|
||||
Array.from({ length: 4 }, (_, i) =>
|
||||
((v >> (i * 8)) & 0xff).toString(16).padStart(2, '0')
|
||||
).join('')
|
||||
)
|
||||
.join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user