ed25519 auth

This commit is contained in:
Toshit Chawda 2024-09-14 10:28:45 -07:00
parent a1963f53f1
commit b2435b554a
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
11 changed files with 450 additions and 118 deletions

View file

@ -1,6 +1,8 @@
//! Wisp protocol extensions.
pub mod password;
pub mod udp;
#[cfg(feature = "certificate")]
pub mod cert;
use std::ops::{Deref, DerefMut};
@ -102,9 +104,9 @@ pub trait ProtocolExtensionBuilder {
fn get_id(&self) -> u8;
/// Build a protocol extension from the extension's metadata.
fn build_from_bytes(&self, bytes: Bytes, role: Role)
fn build_from_bytes(&mut self, bytes: Bytes, role: Role)
-> Result<AnyProtocolExtension, WispError>;
/// Build a protocol extension to send to the other side.
fn build_to_extension(&self, role: Role) -> AnyProtocolExtension;
fn build_to_extension(&mut self, role: Role) -> Result<AnyProtocolExtension, WispError>;
}