decentralized-identity / decentralized-identity/didcomm-rs

Misleading argument name in `Message::seal_signed`

Open
#22 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
53
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hi I have a question about `Message::seal_signed`.

The signature of [`Message::seal_signed`](https://github.com/decentralized-identity/didcomm-rs/blob/main/src/messages/message.rs#L614) is as follows:
```
pub fn seal_signed(
self,
encryption_sender_private_key: &[u8],
encryption_recipient_public_keys: Option>>>,
signing_algorithm: SignatureAlgorithm,
signing_sender_private_key: &[u8],
) -> Result
```
From the name of **signing_sender_private_key** I expect this to be a private key, however in the case of `SignatureAlgorithm::EdDsa` it looks like one should supply an actual key pair here as demonstrated in [section five of your REAMDE](https://github.com/decentralized-identity/didcomm-rs#5-prepare-jws-envelope-wrapped-into-jwe---sign---pack---receive). If it happens to be the case that `signing_sender_private_key` is standard terminology that is universally understood to be the private key concatenated with the public key in the case of `EdDsa` then it is of course fine the way it is now and this issue can be immediately closed. If that is however not the case then it would be great if either the name of the argument would be changed to something more descriptive or the documentation could be updated to explain what is expected here.

Thank you for your time and let me know if there is anything I can do to help.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.