rustls 0.1.2

Rustls is a modern TLS library written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
b0VIM 7.4	��W��-��jbpdebian~jbp/rustls/src/sign.rsutf-8
3210#"! Utp6adM	A
6������bO���usrW@
�
�
�
S
<
8
6
5

��l.�����aF�
�
�
�
�
�
�
�
c
G
C
A
}}  }    Signat}  }    Sign}  }   }  }    S} }  }}  }    SignatureAlgorithm::RSA  fn algorithm(&self) -> SignatureAlgorithm {  }      .map_err(|_| ())      .map(|_| sig)    signer.sign(pad, &rng, message, &mut sig)    );      .map_err(|_| ())      signature::RSASigningState::new(self.key.clone())    let mut signer = try!(    let rng = ring::rand::SystemRandom::new();    };      _ => unreachable!()      &HashAlgorithm::SHA512 => &signature::RSA_PKCS1_SHA512,      &HashAlgorithm::SHA384 => &signature::RSA_PKCS1_SHA384,      &HashAlgorithm::SHA256 => &signature::RSA_PKCS1_SHA256,    let pad = match hash_alg {    let mut sig = vec![0; self.key.public_modulus_len()];  fn sign(&self, hash_alg: &HashAlgorithm, message: &[u8]) -> Result<Vec<u8>, ()> {impl Signer for RSASigner {}  }      .map_err(|_| ())      .map(|s| RSASigner { key: Arc::new(s) })    key    let key = signature::RSAKeyPair::from_der(untrusted::Input::from(der));  pub fn new(der: &[u8]) -> Result<RSASigner, ()> {impl RSASigner {}  key: Arc<signature::RSAKeyPair>pub struct RSASigner {/// A Signer for RSA-PKCS1}  fn algorithm(&self) -> SignatureAlgorithm;  /// What kind of key we have.  fn sign(&self, hash_alg: &HashAlgorithm, message: &[u8]) -> Result<Vec<u8>, ()>;  /// Signs `message`, hashing it with `hash_alg` first.pub trait Signer {/// A thing that can sign a message.use std::sync::Arc;use ring::signature;use ring;use untrusted;use msgs::enums::{HashAlgorithm, SignatureAlgorithm};