apache oltu:
accessToken=md5(UUID.randomUUID().toString())
refreshToken=md5(UUID.randomUUID().toString())
tomcat:
sessinid : SecureRandom SHA1PRNG
java:
private static String genKEY(String algorithm) throws NoSuchAlgorithmException{
KeyGenerator kg = KeyGenerator.getInstance(algorithm);//HmacMD5,HmacSHA1,AES
kg.init(128);// 要生成多少位,只需要修改这里即可128, 192或256
SecretKey sk = kg.generateKey();
byte[] data = sk.getEncoded();
return new HexBinaryAdapter().marshal(data);
}