Skip to content
Snippets Groups Projects
Commit cf82f74e authored by Adrien Béraud's avatar Adrien Béraud
Browse files

python: add PrivateKey::generateEC support

parent a952ddec
Branches
Tags
No related merge requests found
......@@ -267,6 +267,11 @@ cdef class PrivateKey(_WithID):
k = PrivateKey()
k._key = cpp.make_shared[cpp.PrivateKey](cpp.PrivateKey.generate())
return k
@staticmethod
def generateEC():
k = PrivateKey()
k._key = cpp.make_shared[cpp.PrivateKey](cpp.PrivateKey.generateEC())
return k
cdef class PublicKey(_WithID):
cdef cpp.PublicKey _key
......
......@@ -89,6 +89,8 @@ cdef extern from "opendht/crypto.h" namespace "dht::crypto":
Blob decrypt(Blob data) const
@staticmethod
PrivateKey generate()
@staticmethod
PrivateKey generateEC()
cdef cppclass PublicKey:
PublicKey()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment