spring security - How to generate SALT value in Java? -


what's best way produce salt value in java string that's @ least 32 bytes long?

final random r = new securerandom(); byte[] salt = new byte[32]; r.nextbytes(salt); /** string encodedsalt = base64.encodebase64string(salt); */ 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -