(InputStream input,OutputStream outputStream,FEntry fileEntry)
| 414 | } |
| 415 | |
| 416 | public void decryptStream(InputStream input,OutputStream outputStream,FEntry fileEntry) throws IOException { |
| 417 | //String [] path = fileEntry.getFullPath().split("/"); |
| 418 | boolean decryptWithHash = false; |
| 419 | if(/*!path[1].equals("code") && */fileEntry.isExtractWithHash()){ |
| 420 | decryptWithHash = true; |
| 421 | } |
| 422 | long fileOffset = fileEntry.getFileOffset(); |
| 423 | if(decryptWithHash){ |
| 424 | int BLOCKSIZE = 0x10000; |
| 425 | int HASHBLOCKSIZE = 0xFC00; |
| 426 | fileOffset = ((fileEntry.getFileOffset() / HASHBLOCKSIZE) * BLOCKSIZE); |
| 427 | } |
| 428 | input.skip(fileOffset); |
| 429 | |
| 430 | boolean result = false; |
| 431 | if(!decryptWithHash){ |
| 432 | result = decryptFile(input, outputStream, fileEntry); |
| 433 | }else{ |
| 434 | byte[] h3 = fileEntry.getH3(); |
| 435 | result = decryptFileHash(input, outputStream, fileEntry,h3); |
| 436 | } |
| 437 | if(!result){ |
| 438 | |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | private Progress progressListener = null; |
| 443 |
no test coverage detected