pub fn nacl_box_keypair_from_secret_key(
    _context: std::sync::Arc<ClientContext>,
    params: ParamsOfNaclBoxKeyPairFromSecret,
) -> ClientResult<KeyPair> {
    let secret = hex::decode(&params.secret)
        .map_err(|err| crypto::Error::invalid_secret_key(err, &params.secret))?;
    let seed = key256(&secret)?;
    let mut sk = [0u8; 32];
    let mut pk = [0u8; 32];
    sodalite::box_keypair_seed(&mut pk, &mut sk, &seed);
    Ok(KeyPair::new(hex::encode(pk), hex::encode(sk)))
}
/// Generates key pair from a secret key
Generates key pair from a secret key
Generates key pair from a secret key
pub fn nacl_box_keypair_from_secret_key(
    _context: std::sync::Arc<ClientContext>,
    params: ParamsOfNaclBoxKeyPairFromSecret,
) -> ClientResult<KeyPair> {
    let secret = hex::decode(&params.secret)
        .map_err(|err| crypto::Error::invalid_secret_key(err, &params.secret))?;
    let seed = key256(&secret)?;
    let mut sk = [0u8; 32];
    let mut pk = [0u8; 32];
    sodalite::box_keypair_seed(&mut pk, &mut sk, &seed);
    Ok(KeyPair::new(hex::encode(pk), hex::encode(sk)))
}
pub fn nacl_box_keypair_from_secret_key ( _context : std :: sync :: Arc < ClientContext > , params : ParamsOfNaclBoxKeyPairFromSecret , ) -> ClientResult < KeyPair > { let secret = hex :: decode ( & params . secret ) . map_err ( | err | crypto :: Error :: invalid_secret_key ( err , & params . secret ) ) ? ; let seed = key256 ( & secret ) ? ; let mut sk = [ 0u8 ; 32 ] ; let mut pk = [ 0u8 ; 32 ] ; sodalite :: box_keypair_seed ( & mut pk , & mut sk , & seed ) ; Ok ( KeyPair :: new ( hex :: encode ( pk ) , hex :: encode ( sk ) ) ) }
Generates key pair from a secret key
Generates key pair from a secret key
_context
std::sync::Arc<ClientContext>
params
ParamsOfNaclBoxKeyPairFromSecret