import * as bcrypt from 'bcryptjs' ; export class HashHelper { private static salt = 10 ; param str { string } returns public static async encrypt ( str ) { return await bcrypt . hash ( str , this . salt ) ; } param plain { string } param encrypted { string } returns public static async compare ( plain , encrypted ) { return await bcrypt . compare ( plain , encrypted ) ; } }