- Provides compression and encryption for
byte[]
andstring
data, securing it from external access before saving to storage. - Requires a 16-byte string key provided by the user for encryption.
- Includes logic to check for file changes by generating and comparing hash values from
byte[]
orstring
data usingSHA256
.
Choose one of the following installation methods:
Note: Check the version after # in the GitHub URL for the latest changes listed in the Changelog.
- Open UPM and click the + button in the top left.
- Select Install package from git URL....
- Enter
https://github.com/achieveonepark/DataProtector.git#1.0.0
and click Install.
Open the manifest.json file in your Unity project’s Packages folder. Add the following line under dependencies:
"com.achieve.quick-save": "https://github.com/achieveonepark/DataProtector.git#1.0.0"
- Uses
AES-128
encryption for data security. - Compression is handled with C#’s
GZipStream
for efficient data storage.
This package provides the following features:
DataProtector.Encrypt | Returns the result after compressing and encrypting the data.
DataProtector.Decrypt | Returns the result after decrypting and decompressing the data.
HashChecker.ComputeHash | Extracts the hash value of the encrypted data.
HashChecker.ValidateHash | Compares two hash values.