PasswordHasher.ts overview
BetterAuth’s scrypt password hashes as a core PasswordHasher: the seam that keeps BetterAuth’s hashes verifying after a move to native effect-auth.
Since v0.1.0
Exports Grouped by Category
constants
ALGORITHM
The algorithm id, and the prefix that routes a hash to this hasher under Auth.Password.MultiAlgorithmVerifier.
Signature
declare const ALGORITHM: "better-auth-scrypt"
Since v0.1.0
constructors
betterAuthHasher
BetterAuth’s salt:key scrypt hash (hex, through better-auth/crypto), byte for byte what BetterAuth’s account.password column holds.
hash writes BetterAuth’s own format, so a hash it writes still verifies in BetterAuth. verify accepts that format and the same hash prefixed with better-auth-scrypt$, which is how to store moved hashes beside the core’s own: MultiAlgorithmVerifier routes on the segment before the first $, and a bare salt:key has none.
Signature
declare const betterAuthHasher: () => typeof Auth.Password.PasswordHasher.Service
Since v0.1.0
layers
layer
betterAuthHasher as the PasswordHasher layer.
Signature
declare const layer: Layer.Layer<Auth.Password.PasswordHasher, never, never>
Since v0.1.0