Repository navigation
Encryption: portable core, KeyGen and existing asset compatibility - #91
Merged
Merged
Conversation
defisym
force-pushed
the
codex/portable-encryption-sample
branch
from
October 13, 2026 06:05
aece6a3 to
caee0d2
Compare
defisym
force-pushed
the
codex/portable-encryption-sample
branch
from
October 31, 2026 17:08
66b0986 to
3037507
Compare
This was referenced Oct 31, 2026
defisym
force-pushed
the
codex/portable-encryption-sample
branch
from
November 1, 2026 15:04
3037507 to
c3f3457
Compare
defisym
force-pushed
the
codex/portable-encryption-sample
branch
from
November 1, 2026 15:16
c3f3457 to
40ffd48
Compare
4 tasks
defisym
force-pushed
the
codex/portable-encryption-sample
branch
from
November 2, 2026 07:40
40ffd48 to
d80a1bf
Compare
defisym
force-pushed
the
codex/portable-encryption-sample
branch
3 times, most recently
from
November 3, 2026 06:37
b8ec293 to
2f214ee
Compare
defisym
force-pushed
the
codex/portable-encryption-sample
branch
from
November 4, 2026 02:05
45e68cc to
2fdd46c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existing Encryption users relied on Windows BCrypt and the historical Fusion class. This PR replaces the implementation with one portable C++17/OpenSSL core while retaining the compatibility methods, Fusion event interfaces and existing asset format.
Based on master
b1a0551fafter the GeneralDefinition split in #103. FFMpeg playback/AVIO changes remain in dependent PR #102. Existing commits are replayed onto master; review follow-ups remain separate commits.Module layout
The outer
Encryption.h/Encryption.cppremain the compatibility entry point;EncryptionStream.hkeeps the historical push API. The implementation, C adapters, VS projects, CMake and tests now live under_DeLib/Encryption/:Core.h,KeyGen.h,CAPI.h/.cpp,Encryption.slnandEncryption.vcxproj. The library/CMake target isencryption;EncryptionPortablenaming and the old directory are removed. Installed headers retain this hierarchy, so repository and installed consumers use the same include paths. C adapters are consolidated into oneCAPI.hand oneCAPI.cpp, including shared callback declarations and private error translation; the eight split adapter/helper files are removed. All 29 exported C function names and definitions are unchanged.Changes
00..0f.UnicodeConversion.h, exposed globally through GeneralDefinition:to_utf16_string(UTF-8/native-wide overloads) andto_utf16_bytes(UTF-16LE without BOM). This standalone C++17 header has no OpenSSL, Windows API or iconv dependency. Encryption translates conversion errors to its existing argument errors.EncryptionText.his removed.std::filesystem::pathdirectly. No custom path-conversion helper remains. C file APIs accept caller-owned FILE handles or callbacks; mobile bridges select their own encodings/file opening.Review follow-up
require's normal-return contract. Zero-length file reads return before the non-null output requirement, making the fread path explicit to the analyzer.if constexprfor native wchar_t width and explicit smart-pointer boolean conversion. Guard the MSVC warning pragma on other compilers./analyzebuilds, treating analysis warnings as errors, and C file-hash checks for bothabcand EOF/empty input.Validation
12345678ABCDEFGHdecrypts all 1,641,882 original JPEG bytes and reproduces all 1,641,888 old ciphertext bytes./analyze, alongside Linux/macOS CI (module-layout run).Core build instructions · Dependency setup · Pinned SDK release
Manual acceptance
C++ class binary layout is not retained. Full Fusion runtime and device packaging remain separate from native tests. Merge this PR before #102.