// encrypting  a[] with key k[] into e[]
// a[] = array to be encrypted
// k[] = key of truly random gibberish
// e[] = encrypted data
byte[] e = new byte[a.length];
for ( int i=0; i<a.length; i++ )
   {
   e[i] = (byte)( a[i] ^ k[i] );
   }