pub struct AgentIdentity { /* private fields */ }Implementations§
Source§impl AgentIdentity
impl AgentIdentity
pub fn from_file_or_generate_new(path: &Path) -> Result<Self>
pub fn peer_id(&self) -> &PeerId
pub fn ed25519_public_key_hex(&self) -> &str
pub fn x25519_public_key_hex(&self) -> &str
pub fn sign_message_as_hex(&self, message: &[u8]) -> Result<String>
Sourcepub fn decrypt_x25519(
&self,
encrypted_data: &[u8],
nonce: &[u8],
) -> Result<Vec<u8>, String>
pub fn decrypt_x25519( &self, encrypted_data: &[u8], nonce: &[u8], ) -> Result<Vec<u8>, String>
Decrypt data using x25519 + XChaCha20-Poly1305
Note: This method is reserved for future encrypted communication features (e.g., encrypted config updates, encrypted metrics). Currently unused but maintained for forward compatibility with the encryption package.
Expected format of encrypted_data:
- First 32 bytes: ephemeral x25519 public key
- Remaining bytes: XChaCha20-Poly1305 ciphertext (includes auth tag)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentIdentity
impl RefUnwindSafe for AgentIdentity
impl Send for AgentIdentity
impl Sync for AgentIdentity
impl Unpin for AgentIdentity
impl UnwindSafe for AgentIdentity
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage