For AI agents: the complete documentation index is available at /data-protector/zh/llms.txt, the full documentation bundle is available at /data-protector/zh/llms-full.txt, and this page is available as Markdown at /data-protector/zh/api.md.

API

DataProtector

Encrypt

返回对数据先压缩再加密后的结果。

byte[] DataProtector.Encrypt(byte[] data, string key);

Decrypt

返回对数据先解密再解压后的结果。

byte[] DataProtector.Decrypt(byte[] data, string key);

HashChecker

ComputeHash

提取加密数据的哈希值。

string HashChecker.ComputeHash(byte[] data);

ValidateHash

比较两个哈希值。

bool HashChecker.ValidateHash(string hashA, string hashB);