pub struct Signature { /* private fields */ }
Expand description
Digital signature (e.g. DSA, ECDSA, Ed25519).
These are used as part of the OpenSSH certificate format to represent signatures by certificate authorities (CAs).
From OpenSSH’s PROTOCOL.certkeys specification:
Signatures are computed and encoded according to the rules defined for the CA’s public key algorithm (RFC4253 section 6.6 for ssh-rsa and ssh-dss, RFC5656 for the ECDSA types, and RFC8032 for Ed25519).
RSA signature support is implemented using the SHA2 family extensions as described in RFC8332.
Implementations§
source§impl Signature
impl Signature
sourcepub fn new(algorithm: Algorithm, data: impl Into<Vec<u8>>) -> Result<Self>
pub fn new(algorithm: Algorithm, data: impl Into<Vec<u8>>) -> Result<Self>
Create a new signature with the given algorithm and raw signature data.
See specifications in toplevel Signature
documentation for how to
format the raw signature data for a given algorithm.
§Returns
Error::Length
if the signature is not the correct length.
Trait Implementations§
source§impl Ord for Signature
impl Ord for Signature
source§impl PartialOrd for Signature
impl PartialOrd for Signature
source§impl Signer<Signature> for KeypairData
impl Signer<Signature> for KeypairData
source§impl Signer<Signature> for PrivateKey
impl Signer<Signature> for PrivateKey
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)