python: add more crypto bindings

This commit is contained in:
Adrien Beraud committed 2017-03-28 17:33:04 +02:00
1 parent 7c85b74de6
commit 4540be7460
3 files changed
+46 -3

No files matched your search

+8
View File
@@ -32,7 +32,9 @@ cdef extern from "<memory>" namespace "std" nogil:
shared_ptr(T*) except +
T* get()
T operator*()
bool operator bool() const
void reset(T*)
shared_ptr[T] make_shared[T](...) except +
cdef extern from "<functional>" namespace "std" nogil:
cdef cppclass hash[T]:
@@ -82,6 +84,8 @@ cdef extern from "opendht/crypto.h" namespace "dht::crypto":
cdef cppclass PrivateKey:
PrivateKey()
PublicKey getPublicKey() const
@staticmethod
PrivateKey generate()
cdef cppclass PublicKey:
PublicKey()
@@ -89,7 +93,11 @@ cdef extern from "opendht/crypto.h" namespace "dht::crypto":
cdef cppclass Certificate:
Certificate()
Certificate(string pem)
InfoHash getId() const
string toString() const
@staticmethod
Certificate generate(PrivateKey key, string name, Identity ca, bool is_ca)
cdef extern from "opendht/value.h" namespace "dht":
cdef cppclass Value: