Skip to main content

generate_private_key

Function generate_private_key 

Source
pub fn generate_private_key() -> Result<Vec<u8>, &'static str>
Expand description

Generates a new PKCS#8 Ed25519 private key for operator-controlled storage.

§Returns

Returns the successful value produced by crate::provenance::generate_private_key or an error when the operation fails.

§Errors

Returns an error value when crate::provenance::generate_private_key cannot complete successfully.

§Examples

ⓘ
let _result = pharos_runtime_ops::provenance::generate_private_key();