We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Digest
PublicKey::verify()
1 parent 957d3b5 commit 44deeccCopy full SHA for 44deecc
1 file changed
ssh-key/src/public.rs
@@ -224,7 +224,12 @@ impl PublicKey {
224
/// # }
225
/// ```
226
///
227
+ /// The entire message has to be loaded into memory for verification. If loading the
228
+ /// entire message into memory is a problem consider computing a [Digest] via a
229
+ /// streaming API instead, and then signing/verifying a fixed length digest instead.
230
+ ///
231
/// [PROTOCOL.sshsig]: https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL.sshsig?annotate=HEAD
232
+ /// [Digest]: https://docs.rs/digest/latest/digest/trait.Digest.html
233
#[cfg(feature = "alloc")]
234
pub fn verify(&self, namespace: &str, msg: &[u8], signature: &SshSig) -> Result<()> {
235
if self.key_data() != signature.public_key() {
0 commit comments