pub struct SoftwareIdentity { /* private fields */ }Implementations§
Source§impl SoftwareIdentity
impl SoftwareIdentity
pub fn generate(rng: &mut impl CryptoRngCore) -> Self
pub fn from_secret_bytes(bytes: &[u8; 32]) -> Self
Trait Implementations§
Source§impl NodeIdentity for SoftwareIdentity
impl NodeIdentity for SoftwareIdentity
type Error = CryptoError
Source§fn public_key(&self) -> &PublicKey
fn public_key(&self) -> &PublicKey
Return the long-term Ed25519 public key for this identity.
Source§async fn sign(&self, message: &[u8]) -> Result<[u8; 64], Self::Error>
async fn sign(&self, message: &[u8]) -> Result<[u8; 64], Self::Error>
Sign an arbitrary message.
Source§async fn agree(&self, peer: &PublicKey) -> Result<SharedSecret, Self::Error>
async fn agree(&self, peer: &PublicKey) -> Result<SharedSecret, Self::Error>
Perform X25519-style key agreement with a peer public key.
Source§fn hint(&self) -> NodeHint
fn hint(&self) -> NodeHint
Return the three-byte node hint derived from
public_key.