Enum fluence_keypair::key_pair::KeyFormat
source · pub enum KeyFormat {
Ed25519,
Rsa,
Secp256k1,
}Expand description
Identity keypair of a node.
Example: Generating RSA keys with OpenSSL
openssl genrsa -out private.pem 2048
openssl pkcs8 -in private.pem -inform PEM -topk8 -out private.pk8 -outform DER -nocrypt
rm private.pem # optional
Loading the keys:
let mut bytes = std::fs::read("private.pk8").unwrap();
let keypair = Keypair::rsa_from_pkcs8(&mut bytes);
Variants§
Trait Implementations§
source§impl PartialEq<KeyFormat> for KeyFormat
impl PartialEq<KeyFormat> for KeyFormat
impl Copy for KeyFormat
impl Eq for KeyFormat
impl StructuralEq for KeyFormat
impl StructuralPartialEq for KeyFormat
Auto Trait Implementations§
impl RefUnwindSafe for KeyFormat
impl Send for KeyFormat
impl Sync for KeyFormat
impl Unpin for KeyFormat
impl UnwindSafe for KeyFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more