Skip to main content

cache_pubkey

Function cache_pubkey 

Source
pub fn cache_pubkey(alias: &str, pubkey: &[u8]) -> Result<()>
Expand description

Cache a public key for the given alias.

The public key is stored as hex-encoded bytes in ~/.auths/pubkeys/<alias>.pub.

§Arguments

  • alias - The key alias (e.g., “default”).
  • pubkey - The 32-byte Ed25519 public key bytes.

§Returns

  • Ok(()) on success.
  • Err if the cache directory cannot be created or the file cannot be written.