27 lines
755 B
TypeScript
27 lines
755 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'
|
|
|
|
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 {SecretBox, SecretWrap, PrivateBox, PrivateWrap, PwdBox, PwdWrap}
|