Skip to content

Commit 9097dc3

Browse files
fixed incorrect TAG_POS (fortunately unused)
1 parent 6a1c520 commit 9097dc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/cryptomator/cryptolib/v2/FileHeaderImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class FileHeaderImpl implements FileHeader, Destroyable {
1919

2020
static final int NONCE_POS = 0;
2121
static final int NONCE_LEN = Constants.GCM_NONCE_SIZE;
22-
static final int PAYLOAD_POS = 12;
22+
static final int PAYLOAD_POS = NONCE_POS + NONCE_LEN; // 12
2323
static final int PAYLOAD_LEN = Payload.SIZE;
24-
static final int TAG_POS = 56;
24+
static final int TAG_POS = PAYLOAD_POS + PAYLOAD_LEN; // 52
2525
static final int TAG_LEN = Constants.GCM_TAG_SIZE;
2626
static final int SIZE = NONCE_LEN + PAYLOAD_LEN + TAG_LEN;
2727

0 commit comments

Comments
 (0)