Data Protector
- Provides functionality to compress and encrypt
byte[]andstringdata before saving it physically, making it harder to inspect the stored data directly. - For encryption, the user must supply a
16-bytestring keyvalue. - Also provides logic to compare whether a file has changed by extracting a
SHA256hash value frombyte[]orstringdata.
Install
Section titled “Install”Choose one of the installation methods below.
Note: For the version after
#in the GitHub URL, check the latest changes listed in the changelog.
Install via Unity Package Manager (UPM)
Section titled “Install via Unity Package Manager (UPM)”- Open Unity Package Manager and click the
+button in the upper-left corner. - Select
Install package from git URL.... - Enter
https://github.com/achieveonepark/data-protector.git#1.0.0and click Install.
Manual Addition
Section titled “Manual Addition”Open the manifest.json file in your Unity project’s Packages folder.
Add the following line under dependencies.
"com.achieve.infinity-value": "https://github.com/achieveonepark/data-protector.git#1.0.0"Description
Section titled “Description”Compression, Encryption?
Section titled “Compression, Encryption?”- Uses the AES-128 method.
- Uses GZipStream provided by C# for compression.
This package provides the following features.
DataProtector.Encrypt | Result value after compression and encryptionDataProtector.Decrypt | Result value after decryption and decompressionHaskChecker.ComputeHash | Extract the hash value of encrypted dataHaskChecker.ValidateHash | Compare two hash values