/// Serialises a miracl-compatible forward secure secret key into the standard
/// form.
Serialises a miracl-compatible forward secure secret key into the standard
form.
Serialises a miracl - compatible forward secure secret key into the standard form .
pub fn secret_key_from_miracl(miracl_secret_key: &crypto::SecretKey) -> FsEncryptionSecretKey {
    FsEncryptionSecretKey {
        bte_nodes: miracl_secret_key
            .bte_nodes
            .iter()
            .map(|node| BTENode {
                tau: node.tau.iter().map(|i| *i as u8).collect(),
                a: miracl_g1_to_bytes(&node.a),
                b: miracl_g2_to_bytes(&node.b),
                d_t: node.d_t.iter().map(miracl_g2_to_bytes).collect(),
                d_h: node.d_h.iter().map(miracl_g2_to_bytes).collect(),
                e: miracl_g2_to_bytes(&node.e),
            })
            .collect(),
    }
}
pub fn secret_key_from_miracl ( miracl_secret_key : & crypto :: SecretKey ) -> FsEncryptionSecretKey { FsEncryptionSecretKey { bte_nodes : miracl_secret_key . bte_nodes . iter ( ) . map ( | node | BTENode { tau : node . tau . iter ( ) . map ( | i | * i as u8 ) . collect ( ) , a : miracl_g1_to_bytes ( & node . a ) , b : miracl_g2_to_bytes ( & node . b ) , d_t : node . d_t . iter ( ) . map ( miracl_g2_to_bytes ) . collect ( ) , d_h : node . d_h . iter ( ) . map ( miracl_g2_to_bytes ) . collect ( ) , e : miracl_g2_to_bytes ( & node . e ) , } ) . collect ( ) , } }
Serialises a miracl-compatible forward secure secret key into the standard
form.
Serialises a miracl - compatible forward secure secret key into the standard form .
miracl_secret_key
&crypto::SecretKey