weave-identity · keypair
Source declarations, signatures and documentation for keypair.
Source: sigil/weave/adapters/weave-identity/src/keypair.rs. SHA-256: 6009c92e6044ef862d8bbef8da31628426b1406fdc171365d8882368e32104c0.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
keypair::PublicKey
Ed25519 public key
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct PublicKey {
}Source line: 8.
keypair::PublicKey::new
Create a new public key from bytes
pub fn new(bytes: Vec<u8>) -> Self;Source line: 21.
keypair::PublicKey::as_bytes
Get the raw bytes
pub fn as_bytes(&self) -> &[u8];Source line: 26.
keypair::PublicKey::to_bytes
Get the raw bytes as a vector
pub fn to_bytes(&self) -> Vec<u8>;Source line: 31.
keypair::PublicKey::from_verifying_key
Create from Ed25519 verifying key
pub fn from_verifying_key(key: &VerifyingKey) -> Self;Source line: 36.
keypair::PublicKey::to_verifying_key
Convert to Ed25519 verifying key
pub fn to_verifying_key(&self) -> Result<VerifyingKey>;Source line: 41.
keypair::KeyPair
Cryptographic keypair for identity operations
#[derive(Serialize, Deserialize, Zeroize, ZeroizeOnDrop)]
pub struct KeyPair {
}Source line: 58.
keypair::KeyPair::new
Create a new keypair
pub fn new(id: String, public_key: PublicKey, private_key: Vec<u8>) -> Self;Source line: 69.
keypair::KeyPair::generate
Generate a new Ed25519 keypair
pub fn generate() -> Result<Self>;Source line: 78.
keypair::KeyPair::from_signing_key
Create from Ed25519 signing key
pub fn from_signing_key(signing_key: &SigningKey) -> Self;Source line: 92.
keypair::KeyPair::from_bytes
Create from raw key bytes
pub fn from_bytes(private_key_bytes: &[u8]) -> Result<Self>;Source line: 102.
keypair::KeyPair::id
Get the keypair ID
pub fn id(&self) -> &str;Source line: 117.
keypair::KeyPair::public_key
Get the public key
pub fn public_key(&self) -> &PublicKey;Source line: 122.
keypair::KeyPair::private_key_bytes
Get private key bytes (use with caution)
pub fn private_key_bytes(&self) -> &[u8];Source line: 127.
keypair::KeyPair::to_signing_key
Convert to Ed25519 signing key
pub fn to_signing_key(&self) -> Result<SigningKey>;Source line: 132.
keypair::KeyPair::sign
Sign data with this keypair
pub fn sign(&self, data: &[u8]) -> Result<ed25519_dalek::Signature>;Source line: 146.
keypair::KeyPair::verify
Verify signature with this keypair's public key
pub fn verify(&self, data: &[u8], signature: &ed25519_dalek::Signature) -> Result<bool>;Source line: 152.