pub fn from_bytes(bytes: &[u8]) -> Result<Self, AtmsError> {
        let pk = match BlstPk::from_bytes(&bytes[..48]) {
            Ok(key) => PublicKey(key),
            Err(e) => {
                return Err(blst_err_to_atms(e)
                    .expect_err("If it passed, blst returns and error different to SUCCESS."))
            }
        };

        let pop = match BlstSig::from_bytes(&bytes[48..]) {
            Ok(proof) => ProofOfPossession(proof),
            Err(e) => {
                return Err(blst_err_to_atms(e)
                    .expect_err("If it passed, blst returns and error different to SUCCESS."))
            }
        };

        Ok(Self(pk, pop))
    }
/// Deserialise a byte string to a `PublicKeyPoP`.
Deserialise a byte string to a `PublicKeyPoP`.
Deserialise a byte string to a ` PublicKeyPoP ` .
pub fn from_bytes(bytes: &[u8]) -> Result<Self, AtmsError> {
        let pk = match BlstPk::from_bytes(&bytes[..48]) {
            Ok(key) => PublicKey(key),
            Err(e) => {
                return Err(blst_err_to_atms(e)
                    .expect_err("If it passed, blst returns and error different to SUCCESS."))
            }
        };
        let pop = match BlstSig::from_bytes(&bytes[48..]) {
            Ok(proof) => ProofOfPossession(proof),
            Err(e) => {
                return Err(blst_err_to_atms(e)
                    .expect_err("If it passed, blst returns and error different to SUCCESS."))
            }
        };
        Ok(Self(pk, pop))
    }
pub fn from_bytes ( bytes : & [ u8 ] ) -> Result < Self , AtmsError > { let pk = match BlstPk :: from_bytes ( & bytes [ .. 48 ] ) { Ok ( key ) => PublicKey ( key ) , Err ( e ) => { return Err ( blst_err_to_atms ( e ) . expect_err ( " " ) ) } } ; let pop = match BlstSig :: from_bytes ( & bytes [ 48 .. ] ) { Ok ( proof ) => ProofOfPossession ( proof ) , Err ( e ) => { return Err ( blst_err_to_atms ( e ) . expect_err ( " " ) ) } } ; Ok ( Self ( pk , pop ) ) }
Deserialise a byte string to a `PublicKeyPoP`.
Deserialise a byte string to a ` PublicKeyPoP ` .
bytes
&[u8]