hi everyone,
i would like to know how to convert byte array into key.
i am doing an AES encryption/decryption. instead of generating a key, i would like to use my generated byte array.
byte[] clientCK = Milenage.f3(sharedSecret16, RANDbytes, opc);
let say i have a byte array called clientCK, stated above. i want to use it in AES encryption as shown below.
Cipher c = Cipher.getInstance("AES");
c.init(Cipher.ENCRYPT_MODE, key);
byte[] encValue = c.doFinal(valueToEnc.getBytes());
String encryptedValue = new BASE64Encoder().encode(encValue);
therefore, i need to convert that byte array clientCK into key format. please help.