309310311312313314315316317318319
byte[] a_key = hasher.getDigest(); hasher = new SHA1Hasher(); hasher.update( KEYB_IV ); hasher.update( session_secret ); byte[] b_key = hasher.getDigest(); hasher = new SHA1Hasher();
315316317318319320321322323324325
byte[] b_key = hasher.getDigest(); hasher = new SHA1Hasher(); hasher.update( KEYC_IV ); hasher.update( session_secret ); byte[] c_key = hasher.getDigest(); hasher = new SHA1Hasher();
316317318319320321322323324325326
322323324325326327328329330331332
byte[] c_key = hasher.getDigest(); hasher = new SHA1Hasher(); hasher.update( KEYD_IV ); hasher.update( session_secret ); byte[] d_key = hasher.getDigest(); // for RC4 enc/dec is irrelevant
323324325326327328329330331332333
13181319132013211322132313241325132613271328
header_cipher_in.processBytes( data, 14, header_len-14, data, 14 ); SHA1Hasher hasher = new SHA1Hasher(); hasher.update( data, 4, 4 ); hasher.update( data, 12, header_len - 4 - 12 ); byte[] hash = hasher.getDigest(); for (int i=0;i<4;i++){
13191320132113221323132413251326132713281329
22422243224422452246224722482249225022512252
byte[] buffer_bytes = buffer.array(); SHA1Hasher hasher = new SHA1Hasher(); hasher.update( buffer_bytes, 4, 4 ); hasher.update( buffer_bytes, 12, total_length - 12 ); byte[] hash = hasher.getDigest(); buffer.position( total_length );
22432244224522462247224822492250225122522253