Rename save_self_keypair

For the ffi rename to dc_preconfigure_keypair.  For the internal API
to store_self_keypair.
This commit is contained in:
Floris Bruynooghe
2020-02-06 21:32:17 +01:00
committed by Floris Bruynooghe
parent a903805cd9
commit fc0292bf8a
8 changed files with 19 additions and 19 deletions

View File

@@ -118,15 +118,15 @@ class Account(object):
assert res != ffi.NULL, "config value not found for: {!r}".format(name)
return from_dc_charpointer(res)
def _save_self_keypair(self, addr, public, secret):
def _preconfigure_keypair(self, addr, public, secret):
"""See _dc_save_self_keypair() in deltachat.h.
In other words, you don't need this.
"""
res = lib._dc_save_self_keypair(self._dc_context,
as_dc_charpointer(addr),
as_dc_charpointer(public),
as_dc_charpointer(secret))
res = lib.dc_preconfigure_keypair(self._dc_context,
as_dc_charpointer(addr),
as_dc_charpointer(public),
as_dc_charpointer(secret))
if res == 0:
raise Exception("Failed to set key")