mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 17:36:55 +01:00
Fixing the IV for certain reads
This commit is contained in:
parent
0261e33b80
commit
a5bc706cb9
@ -116,7 +116,7 @@ public class NUSDecryption extends AESDecryption {
|
|||||||
// current IV.
|
// current IV.
|
||||||
if (skipoffset > 0) {
|
if (skipoffset > 0) {
|
||||||
int skippedBytes = StreamUtils.getChunkFromStream(inputStream, blockBuffer, overflow, skipoffset);
|
int skippedBytes = StreamUtils.getChunkFromStream(inputStream, blockBuffer, overflow, skipoffset);
|
||||||
if (skippedBytes > 16) {
|
if (skippedBytes >= 16) {
|
||||||
IV = Arrays.copyOfRange(blockBuffer, skippedBytes - 16, skippedBytes);
|
IV = Arrays.copyOfRange(blockBuffer, skippedBytes - 16, skippedBytes);
|
||||||
}
|
}
|
||||||
skipoffset = 0;
|
skipoffset = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user