8 Commits

Author SHA1 Message Date
NikitolProject
9fdeafbbd7 feat(kotlin): add --key, --key-file, --password support to ArchiveDecoder
Some checks failed
CI / test (push) Failing after 40s
Remove hardcoded KEY constant and accept key via CLI arguments.
Add Argon2id KDF (Bouncy Castle) with parameters matching Rust impl,
salt reading for password-derived archives, and hex/key-file parsing.
2026-02-27 02:11:20 +03:00
NikitolProject
27fb3926cf test(09-01): add directory test cases to Kotlin cross-validation script
- Test 6: nested directory extraction (3+ levels deep, 4 files)
- Test 7: empty directory creation without decryption errors
- Test 8: mixed standalone files + directory pack/unpack
- All 5 original test cases preserved unchanged

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:05:29 +03:00
NikitolProject
a01b260944 feat(09-01): update Kotlin decoder for v1.1 format with directory support
- Add entryType and permissions fields to TocEntry data class
- Parse entry_type (1 byte) and permissions (2 bytes LE) in parseTocEntry
- Update version check from 1 to 2 for v1.1 format
- Handle directory entries: create dirs without decryption
- Create parent directories for files with relative paths
- Add applyPermissions() using Java File API (owner vs everyone)
- Update entry size formula comment to 104 + name_length

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:04:54 +03:00
NikitolProject
96048f31f2 clean: Delete unused .jar file
All checks were successful
CI / test (push) Successful in 40s
2026-02-25 03:12:51 +03:00
NikitolProject
e0605b2955 docs: Add README files & etc 2026-02-25 02:50:47 +03:00
NikitolProject
cef681fd13 feat(06-02): add XOR header bootstrapping and encrypted TOC support to Kotlin decoder
- Add XOR_KEY constant matching FORMAT.md Section 9.1
- Add xorHeader() function with signed byte masking (and 0xFF)
- Update decode() with XOR bootstrapping: check magic, XOR if mismatch
- Update decode() with TOC decryption: decrypt when flags bit 1 is set
- Backward compatible: plain headers and unencrypted TOC still work
2026-02-25 02:24:25 +03:00
NikitolProject
62ff949194 feat(04-01): add cross-validation test script for Kotlin decoder
- Checks prerequisites (kotlinc, java, cargo) with install instructions
- Test 1: single text file round-trip (Rust pack -> Kotlin decode)
- Test 2: multiple files with mixed content (text + 10KB binary)
- Test 3: no-compress mode for pre-compressed files
- Test 4: empty file edge case
- Test 5: large file (100 KB random data)
- SHA-256 comparison of original vs extracted for each test
- Colored output, temp directory cleanup via trap, non-zero exit on failure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:09:35 +03:00
NikitolProject
f2f3ed42da feat(04-01): implement Kotlin archive decoder with full decode pipeline
- 40-byte header parsing with magic byte, version, and flags validation
- Variable-length TOC entry parsing with little-endian ByteBuffer helpers
- HMAC-SHA-256 verification BEFORE decryption (Encrypt-then-MAC)
- AES-256-CBC decryption via javax.crypto with PKCS5Padding
- Gzip decompression via java.util.zip when compression_flag == 1
- SHA-256 checksum verification after decompression
- Hardcoded 32-byte key matching src/key.rs exactly
- CLI main() for standalone JAR usage
- Zero third-party dependencies (only Android SDK / JVM stdlib)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:08:13 +03:00