private_key_hex

Extract the hexadecimal payload from a private key

Rust primitives

dotenvx_primitives::private_key_hex

Usage

Returns Option<&str>. Recognizes the 3.0 private-key prefix and checks the hexadecimal payload shape.


let pair = dotenvx_primitives::keypair(None)?;
assert!(dotenvx_primitives::private_key_hex(&pair.private_key).is_some());

markdown