Skip to content

python: Don't return Vec<u8>#257

Merged
geonnave merged 1 commit intolake-rs:mainfrom
chrysn-pull-requests:py-return-no-vec-u8
May 3, 2024
Merged

python: Don't return Vec<u8>#257
geonnave merged 1 commit intolake-rs:mainfrom
chrysn-pull-requests:py-return-no-vec-u8

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Apr 19, 2024

The ID_CRED_x returned in the initiator and responder APIs are unintuitive for Python users when arrays (esp. if they see examples where it's a [10] style single value -- to a Python user that looks more like a parsed CBOR, more so if that is actually what parsing a CBOR sequence would give). Returning it as Python bytes makes it easier to understand that this is the opaque data indicating either an identifier or a credential by value.

Closes: #256

The ID_CRED_x returned in the initiator and responder APIs are
unintuitive for Python users when arrays (esp. if they see examples
where it's a `[10]` style single value -- to a Python user that looks
more like a parsed CBOR, more so if that is actually what parsing a CBOR
sequence would give). Returning it as Python bytes makes it easier to
understand that this is the opaque data indicating either an identifier
or a credential by value.

Closes: lake-rs#256
@geonnave
Copy link
Copy Markdown
Collaborator

geonnave commented May 3, 2024

Looks good, thank you. (this was an overlook on my side, initially did all with Vec but then realized bytes was better, and obviously forgot to update some functions 🙃)

@geonnave geonnave merged commit 643ee3c into lake-rs:main May 3, 2024
@chrysn chrysn deleted the py-return-no-vec-u8 branch May 3, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: parse_message_2 produces id_cred_r as array

2 participants