Demo entry 5862943

JAVA

   

Submitted by anonymous on Aug 11, 2016 at 04:10
Language: Java. Code size: 202 Bytes.

private String generateSalt() {
	byte[] data = new byte[0x10];
	for (int i = 0; i < data.length; i++) {
		data[i] = (byte)(Math.random() * 255 - 128);
	}
	return new String(Base64.encode(data));
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).