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();

Implementations

impl Signer[src]

pub fn new(key: &Privkey, padding: &str) -> Result<Signer>[src]

Create a new signature operator

pub fn update(&self, data: &[u8]) -> Result<()>[src]

Add more bytes of the message that will be signed

pub fn finish(&self, rng: &RandomNumberGenerator) -> Result<Vec<u8>>[src]

Complete and return the signature

Trait Implementations

impl Debug for Signer[src]

impl Drop for Signer[src]

Auto Trait Implementations

impl RefUnwindSafe for Signer

impl !Send for Signer

impl !Sync for Signer

impl Unpin for Signer

impl UnwindSafe for Signer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.