add encryption (#1002)

* add encryption

* add doc

* add doc

* fix bug
This commit is contained in:
Thomas Young
2023-01-03 15:57:03 +08:00
committed by GitHub
parent 11ce2f42a7
commit ab49b41080
32 changed files with 1865 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
import fastdeploy as fd
import os
if __name__ == "__main__":
input = "Hello"
cipher, key = fd.encryption.encrypt(input)
output = fd.encryption.decrypt(cipher, key)
assert input == output, "test encryption failed"
print("test encryption success")