How to generate 128 bits binary?
843811Feb 25 2005 — edited Feb 25 2005Dear all,
I have to generate 128 bits binary challenge/response. I have created 128 bits String but it is too large for encrypt and decrypt. Can you tell me how to change to 128 bits binary byte or integer so the size can be reduced for encrypt/decrypt?
Thanks a lots!!!!!
Random rand = new Random();
int a;
String nonce = "";
for (int i = 0; i < 128; i++) {
a = rand.nextInt(2);
nonce = nonce + String.valueOf(a);
}