title: Converting a BigInteger into a Key
body: <p>how do i cast a Big Integer into a Key for java cryptography library?
  I am trying to use a shared diffie hellman key that i generated myself for the key value for AES encryption.</p>
  
  <p>Below is the code that i used</p>
  
  <blockquote>
  <pre><code>BigInteger bi; long value = 1000000000; 
  </code></pre>
    
    <p>bi = BigInteger.valueOf(value); 
    Key key = new Key (bi);</p>
  </blockquote>
  
  <p>however it did not work.
  May i know how do i convert a BigInteger value into a Key value?</p>
  
  <p>Thanks in advance!</p>