Struct botan::Signer [−][src]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,