Skip to content

Commit

Permalink
make Key class in python also use the new interface
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
  • Loading branch information
berendsliedrecht committed May 6, 2024
1 parent d9968f9 commit 4c5bc48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wrappers/python/aries_askar/key.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Handling of Key instances."""

from typing import Union
from typing import Union, Optional

from . import bindings
from .bindings import AeadParams, Encrypted, LocalKeyHandle
from .types import KeyAlg, SeedMethod
from .types import KeyAlg, KeyBackend, SeedMethod


class Key:
Expand All @@ -15,8 +15,8 @@ def __init__(self, handle: LocalKeyHandle):
self._handle = handle

@classmethod
def generate(cls, alg: Union[str, KeyAlg], *, ephemeral: bool = False) -> "Key":
return cls(bindings.key_generate(alg, ephemeral))
def generate(cls, alg: Union[str, KeyAlg], *, key_backend: Optional[KeyBackend] = None, ephemeral: bool = False) -> "Key":
return cls(bindings.key_generate(alg, key_backend, ephemeral))

@classmethod
def from_seed(
Expand Down

0 comments on commit 4c5bc48

Please sign in to comment.