public class TokenHash extends Object
Constructor and Description |
---|
TokenHash() |
Modifier and Type | Method and Description |
---|---|
String |
encrypt(String value,
String salt) |
String |
generateRandomToken() |
String |
generateRandomToken(int byteSize) |
String |
generateSalt()
Uses
SecureRandom to generate a random bytes of size 32
which is converted to a string containing a lexical base64 representation |
public String generateSalt()
SecureRandom
to generate a random bytes of size 32
which is converted to a string containing a lexical base64 representationpublic String generateRandomToken()
public String generateRandomToken(int byteSize)
Copyright © 2017. All rights reserved.