pub struct BIPublicKey { /* private fields */ }Expand description
BI public key (.bikey)
Implementations§
Source§impl BIPublicKey
impl BIPublicKey
Sourcepub fn read<I: Read>(input: &mut I) -> Result<BIPublicKey, Error>
pub fn read<I: Read>(input: &mut I) -> Result<BIPublicKey, Error>
Reads a public key from the given input.
§Errors
Returns an error if the input is not a valid public key.
Sourcepub fn verify(&self, pbo: &PBO, signature: &BISign) -> Result<(), Error>
pub fn verify(&self, pbo: &PBO, signature: &BISign) -> Result<(), Error>
Verifies a signature against this public key.
§Errors
Returns an error if the signature was made with a different key, a signature value is not smaller than the modulus, the PBO’s stored SHA-1 trailer does not match its contents (a checksum mismatch), hashing fails or one of the signature hashes doesn’t match.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BIPublicKey
impl RefUnwindSafe for BIPublicKey
impl Send for BIPublicKey
impl Sync for BIPublicKey
impl Unpin for BIPublicKey
impl UnsafeUnpin for BIPublicKey
impl UnwindSafe for BIPublicKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more