pub fn write_pub_key(&mut self, key: &PublicKey) {
         // Write the public key
         match &key.kind {
            PublicKeyKind::Ecdsa(key) => {
                self.write_string(key.curve.identifier);
                self.write_bytes(&key.key);
            },
            PublicKeyKind::Rsa(key) => {
                self.write_mpint(&key.e);
                self.write_mpint(&key.n);
            },
            PublicKeyKind::Ed25519(key) => {
                self.write_bytes(&key.key);
            }
        };
    }
/// Writes a `PublicKey` to the underlying byte sequence.
///
/// # Example
/// ```
/// ```
Writes a `PublicKey` to the underlying byte sequence.
Writes a ` PublicKey ` to the underlying byte sequence .
pub fn write_pub_key(&mut self, key: &PublicKey) {
         // Write the public key
         match &key.kind {
            PublicKeyKind::Ecdsa(key) => {
                self.write_string(key.curve.identifier);
                self.write_bytes(&key.key);
            },
            PublicKeyKind::Rsa(key) => {
                self.write_mpint(&key.e);
                self.write_mpint(&key.n);
            },
            PublicKeyKind::Ed25519(key) => {
                self.write_bytes(&key.key);
            }
        };
    }
pub fn write_pub_key ( & mut self , key : & PublicKey ) { // Write the public key match & key . kind { PublicKeyKind :: Ecdsa ( key ) => { self . write_string ( key . curve . identifier ) ; self . write_bytes ( & key . key ) ; } , PublicKeyKind :: Rsa ( key ) => { self . write_mpint ( & key . e ) ; self . write_mpint ( & key . n ) ; } , PublicKeyKind :: Ed25519 ( key ) => { self . write_bytes ( & key . key ) ; } } ; }
Writes a `PublicKey` to the underlying byte sequence.
Writes a ` PublicKey ` to the underlying byte sequence .
&mut self
key
&PublicKey
example
None