UNPKG
@lucia-auth/sveltekit
Version:
latest (0.6.11)
0.6.11
0.6.10
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.3
0.6.2
0.6.1
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
0.4.0
0.3.3
0.3.2
0.3.0
0.2.0
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
SvelteKit integration for Lucia
github.com/pilcrowOnPaper/lucia
pilcrowOnPaper/lucia
@lucia-auth/sveltekit
/
server
/
crypto.js
8 lines
(7 loc)
•
264 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{ blake3 }
from
"@noble/hashes/blake3"
;
export
const
generateChecksum
= (
input
) => {
return
convertUint8ArrayToHex
(
blake3
(input)); };
const
convertUint8ArrayToHex
= (
arr
) => {
return
[...arr].
map
(
(
x
) =>
x.
toString
(
16
).
padStart
(
2
,
"0"
)).
join
(
""
); };