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