didcomm-rs icon indicating copy to clipboard operation
didcomm-rs copied to clipboard

Misleading argument name in `Message::seal_signed`

Open olivereanderson opened this issue 2 years ago • 1 comments

Hi I have a question about Message::seal_signed.

The signature of Message::seal_signed is as follows:

    pub fn seal_signed(
        self,
        encryption_sender_private_key: &[u8],
        encryption_recipient_public_keys: Option<Vec<Option<Vec<u8>>>>,
        signing_algorithm: SignatureAlgorithm,
        signing_sender_private_key: &[u8],
    ) -> Result<String, Error>

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. 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.

olivereanderson avatar Jun 08 '22 07:06 olivereanderson

cc @Exulansis

styvane avatar Aug 25 '22 05:08 styvane