Skip to content

Commit

Permalink
Removed warning in docs for VerifyingKey::from_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
rozbb committed May 10, 2024
1 parent 9252fa5 commit 78dfb48
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ed25519-dalek/src/verifying.rs
Expand Up @@ -124,12 +124,6 @@ impl VerifyingKey {

/// Construct a `VerifyingKey` from a slice of bytes.
///
/// # Warning
///
/// The caller is responsible for ensuring that the bytes passed into this
/// method actually represent a `curve25519_dalek::curve::CompressedEdwardsY`
/// and that said compressed point is actually a point on the curve.
///
/// # Example
///
/// ```
Expand All @@ -154,8 +148,8 @@ impl VerifyingKey {
///
/// # Returns
///
/// A `Result` whose okay value is an EdDSA `VerifyingKey` or whose error value
/// is a `SignatureError` describing the error that occurred.
/// A `Result` whose okay value is an EdDSA `VerifyingKey` or a decompression error if the
/// provided bytes do not represent the \\(y\\)-coordinate of a curve point.
#[inline]
pub fn from_bytes(bytes: &[u8; PUBLIC_KEY_LENGTH]) -> Result<VerifyingKey, SignatureError> {
let compressed = CompressedEdwardsY(*bytes);
Expand Down

0 comments on commit 78dfb48

Please sign in to comment.