python: add aesEncrypt, aesDecrypt with password

This commit is contained in:
Adrien Béraud committed 2023-11-27 15:16:46 -05:00
1 parent 415e5b5655
commit a7fd156d9f
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()