Skip to content

Commit

Permalink
ensure hkdf can return entirety of expand
Browse files Browse the repository at this point in the history
  • Loading branch information
wfatherley committed Aug 4, 2024
1 parent a68d70c commit ac0d99f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hkdfref/_hkdfref.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Any, Callable


logger = getLogger(__name__)
logger = getLogger(__name__[1:])


default_hash = hashlib.sha512
Expand Down Expand Up @@ -39,7 +39,9 @@ def hkdf(*ikm: bytes, **kwargs: Any) -> bytes:
prk = extract(salt, *ikm, hash=extract_hash)
else:
prk = b"".join(ikm)
return expand(prk, info, l, expand_hash)
return expand(
prk, info, l, expand_hash, return_all=kwargs.get("return_all", False)
)


def expand(
Expand Down

0 comments on commit ac0d99f

Please sign in to comment.