Files
libcrypto/index.ts
T
pascal dbba961dbf
ci/woodpecker/manual/test Pipeline was successful
Import pwd hashing and verification
2024-10-15 21:48:56 +02:00

29 lines
828 B
TypeScript

import SecretBox from './src/secret-box'
import SecretWrap from './src/secret-wrap'
import PrivateBox from './src/private-box'
import PrivateWrap from './src/private-wrap'
import PwdBox from './src/pwd-box'
import PwdWrap from './src/pwd-wrap'
import {hash, verify} from './src/pwd'
export enum Strength {
weak,
moderate,
strong
}
export const set_strength = (new_strength: Strength) => {
if (!(new_strength in Strength)) throw 'Invalid strength !'
strength = new_strength
}
let strength = Strength.moderate
export let STRENGTH: () => Strength = () => strength
export * as kdf from './src/kdf'
export * as misc from './src/misc'
export * as signature from './src/signature'
export * as JWT from './src/jwt'
export const pwd = {hash, verify}
export {SecretBox, SecretWrap, PrivateBox, PrivateWrap, PwdBox, PwdWrap}