Implement strength for whole library
This commit is contained in:
@@ -5,6 +5,19 @@ 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'
|
||||
|
||||
Reference in New Issue
Block a user