pub struct OlmUtility { /* private fields */ }
Implementations§
Source§impl OlmUtility
Allows you to make use of crytographic hashing via SHA-2 and
verifying ed25519 signatures.
impl OlmUtility
Allows you to make use of crytographic hashing via SHA-2 and verifying ed25519 signatures.
Sourcepub fn sha256_bytes(&self, input_buf: &[u8]) -> String
pub fn sha256_bytes(&self, input_buf: &[u8]) -> String
Sourcepub fn sha256_utf8_msg(&self, msg: &str) -> String
pub fn sha256_utf8_msg(&self, msg: &str) -> String
Convenience function that converts the UTF-8 message
to bytes and then calls sha256_bytes()
, returning its output.
Sourcepub fn ed25519_verify(
&self,
key: &str,
message: &str,
signature: String,
) -> Result<bool, OlmUtilityError>
pub fn ed25519_verify( &self, key: &str, message: &str, signature: String, ) -> Result<bool, OlmUtilityError>
Trait Implementations§
Source§impl Default for OlmUtility
impl Default for OlmUtility
Auto Trait Implementations§
impl Freeze for OlmUtility
impl RefUnwindSafe for OlmUtility
impl !Send for OlmUtility
impl !Sync for OlmUtility
impl Unpin for OlmUtility
impl UnwindSafe for OlmUtility
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