feat: test auth

This commit is contained in:
thomas
2024-03-29 21:29:52 +01:00
parent 73a81f4831
commit 18b1dc0a70
18 changed files with 1749 additions and 386 deletions

15
docs/src/utils/encrypt.ts Normal file
View File

@@ -0,0 +1,15 @@
export function toHexString(value: string): string {
return value
.split('')
.map((c) => c.charCodeAt(0).toString(16).padStart(2, '0'))
.join('');
}
export function fromHexString(hexString: string): string {
return (
hexString
.match(/.{1,2}/g)
?.map((byte) => String.fromCharCode(parseInt(byte, 16)))
.join('') ?? ''
);
}