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