python: add aesEncrypt, aesDecrypt with password

This commit is contained in:
Adrien Béraud authored and Adrien Béraud committed 2023-11-28 10:49:41 -05:00
1 parent 09046ec698
commit 4c1c6cf8e9
2 files changed
+22

No files matched your search

+2
View File
@@ -94,6 +94,8 @@ ctypedef vector[uint8_t] Blob
cdef extern from "opendht/crypto.h" namespace "dht::crypto":
ctypedef pair[shared_ptr[PrivateKey], shared_ptr[Certificate]] Identity
cdef Identity generateIdentity(string name, Identity ca, unsigned bits)
cdef Blob aesEncrypt(Blob data, string password) except +
cdef Blob aesDecrypt(Blob encrypted, string password) except +
cdef cppclass PrivateKey:
PrivateKey()