pub trait PrivateKey {
    // Required methods
    fn as_ref(private_key: &Self) -> &[u8] ;
    fn into(private_key: Self) -> Vec<u8> ;
    fn serialize<S: Serializer>(
        private_key: &Self,
        serializer: S
    ) -> Result<S::Ok, S::Error>;
}
Available on crate feature dangerous only.
Expand description

Gives read access to the PrivateKey.

Security

This is only dangerous in the sense that you aren’t supposed to leak the PrivateKey. Make sure to use this carefully!

Required Methods§

source

fn as_ref(private_key: &Self) -> &[u8]

Returns a &[u8] to the PrivateKey.

Security

This is only dangerous in the sense that you aren’t supposed to leak the PrivateKey. Make sure to use this carefully!

source

fn into(private_key: Self) -> Vec<u8>

Returns a Vec<u8> to the PrivateKey.

Security

This is only dangerous in the sense that you aren’t supposed to leak the PrivateKey. Make sure to use this carefully!

source

fn serialize<S: Serializer>( private_key: &Self, serializer: S ) -> Result<S::Ok, S::Error>

Serialize with serde.

Security

This is only dangerous in the sense that you aren’t supposed to leak the PrivateKey. Make sure to use this carefully!

Errors

S::Error if serialization failed.

Implementors§