Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/src/main/java/io/opentdf/platform/sdk/NanoTDF.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public int createNanoTDF(ByteBuffer data, OutputStream outputStream,
System.arraycopy(iv, 0, actualIV, kIvPadding, iv.length);
} while (Arrays.equals(actualIV, kEmptyIV)); // if match, we need to retry to prevent key + iv reuse with the policy

byte[] cipherData = gcm.encrypt(actualIV, authTagSize, data.array(), 0, dataSize);
byte[] cipherData = gcm.encrypt(actualIV, authTagSize, data.array(), data.arrayOffset(), dataSize);

// Write the length of the payload as int24
int cipherDataLengthWithoutPadding = cipherData.length - kIvPadding;
Expand Down