Skip to content

Commit

Permalink
Merge branch 'main' into serialized-name-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
strantalis authored Nov 13, 2024
2 parents 9adb8ab + 0d6e761 commit 8e537bf
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 8e537bf

Please sign in to comment.