Struct botan::Signer [−][src]
pub struct Signer { /* fields omitted */ }
An object that can generate signatures
Examples
let rng = botan::RandomNumberGenerator::new_system().unwrap(); let rsa = botan::Privkey::create("RSA", "2048", &rng).unwrap(); let signer = botan::Signer::new(&rsa, "PKCS1v15(SHA-256)").unwrap(); signer.update(&[1,2,3]).unwrap(); let signature = signer.finish(&rng).unwrap();
Methods
impl Signer
[src]
impl Signer
pub fn new(key: &Privkey, padding: &str) -> Result<Signer>
[src]
pub fn new(key: &Privkey, padding: &str) -> Result<Signer>
Create a new signature operator
pub fn update(&self, data: &[u8]) -> Result<()>
[src]
pub fn update(&self, data: &[u8]) -> Result<()>
Add more bytes of the message that will be signed
pub fn finish(&self, rng: &RandomNumberGenerator) -> Result<Vec<u8>>
[src]
pub fn finish(&self, rng: &RandomNumberGenerator) -> Result<Vec<u8>>
Complete and return the signature
Trait Implementations
impl Debug for Signer
[src]
impl Debug for Signer
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Signer
[src]
impl Drop for Signer