dalek-cryptography / x25519-dalek

X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.
BSD 3-Clause "New" or "Revised" License
326 stars 132 forks source link

Add `StaticSecret::as_bytes` accessor (see issue #101) #102

Closed cipriancraciun closed 1 year ago

cipriancraciun commented 1 year ago

This pull request is trivial and just adds the as_bytes accessor to StaticSecret, thus solving #101.

I didn't add any test-cases as it's a trivial accessor.

dlblv commented 1 year ago

Isn't it a duplicate of https://github.com/dalek-cryptography/x25519-dalek/pull/96?

cipriancraciun commented 1 year ago

Isn't it a duplicate of #96?

It might be, although my patch is perhaps simpler and just adds the as_bytes functions without any collateral changes.

In the end, any patch that provides the functionality would be nice. :)

tarcieri commented 1 year ago

I merged #96 instead