diff --git a/python/opendht.pyx b/python/opendht.pyx index 024ac9b0..d5aa9617 100644 --- a/python/opendht.pyx +++ b/python/opendht.pyx @@ -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 diff --git a/python/opendht_cpp.pxd b/python/opendht_cpp.pxd index 9cf1330e..60c23dad 100644 --- a/python/opendht_cpp.pxd +++ b/python/opendht_cpp.pxd @@ -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()