public static Password createPassword ( char [ ] password ) { byte [ ] salt = JKSecurityUtil . salt ( ) ; byte [ ] hash = JKSecurityUtil . hash ( password , salt ) ; Password pass = new Password ( ) ; pass . setHash ( encodeInToBase64 ( hash ) ) ; pass . setSalt ( encodeInToBase64 ( salt ) ) ; return pass ; }
Encrypt password .