MCPcopy Create free account
hub / github.com/RustCrypto/SSH / sign

Method sign

ssh-key/src/sshsig.rs:120–132  ·  view source on GitHub ↗

Sign the given message with the provided signing key. See also: [`PrivateKey::sign`]. # Errors - Returns [`Error::AlgorithmUnsupported`] if this signing key's algorithm is unsupported by this library with its enabled features. - Returns [`Error::Crypto`] in the event of an error occurring in the cryptographic implementation. - Returns [`Error::Namespace`] if the namespace is empty.

(
        signing_key: &S,
        namespace: &str,
        hash_alg: HashAlg,
        msg: &[u8],
    )

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 9

try_signMethod · 0.45
sign_and_verify_ed25519Function · 0.45
ed25519_sign_and_verifyFunction · 0.45
rsa_sign_and_verifyFunction · 0.45
sign_dsaFunction · 0.45
sign_ecdsa_p256Function · 0.45
sign_ed25519Function · 0.45
sign_rsaFunction · 0.45

Calls 2

as_sliceMethod · 0.80
digestMethod · 0.80

Tested by 8

sign_and_verify_ed25519Function · 0.36
ed25519_sign_and_verifyFunction · 0.36
rsa_sign_and_verifyFunction · 0.36
sign_dsaFunction · 0.36
sign_ecdsa_p256Function · 0.36
sign_ed25519Function · 0.36
sign_rsaFunction · 0.36