[−][src]Struct mundane::public::ed25519::Ed25519Signature
An Ed25519 signature.
Methods
impl Ed25519Signature
[src]
#[must_use]
pub fn from_bytes(bytes: [u8; 64]) -> Ed25519Signature
[src]
Constructs an Ed25519Signature
signature from raw bytes.
#[must_use]
pub fn bytes(&self) -> &[u8; 64]
[src]
Gets the raw bytes of the signature.
#[must_use]
pub fn sign_ed25519(key: &Ed25519PrivKey, message: &[u8]) -> Ed25519Signature
[src]
Trait Implementations
impl Signature for Ed25519Signature
[src]
type PrivateKey = Ed25519PrivKey
The private key type used to generate this signature.
fn sign(key: &Ed25519PrivKey, message: &[u8]) -> Result<Ed25519Signature, Error>
[src]
Sign a message.
Though the Signature
trait requires that sign
return a Result
,
Ed25519Signature
's implementation is guaranteed to always return Ok
.
Callers may prefer the sign_ed25519
function, which returns an
Ed25519Signature
rather than a Result
.
fn is_valid(&self, key: &Ed25519PubKey, message: &[u8]) -> bool
[src]
impl Debug for Ed25519Signature
[src]
Auto Trait Implementations
impl Send for Ed25519Signature
impl Unpin for Ed25519Signature
impl Sync for Ed25519Signature
impl RefUnwindSafe for Ed25519Signature
impl UnwindSafe for Ed25519Signature
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,