pub fn from_bytes<B: Borrow<[u8; PK_SIZE]>>(bytes: B) -> FromBytesResult<Self> {
        let mut compressed: <G2Affine as CurveAffine>::Compressed = EncodedPoint::empty();
        compressed.as_mut().copy_from_slice(bytes.borrow());
        let opt_affine = compressed.into_affine().ok();
        let projective = opt_affine.ok_or(FromBytesError::Invalid)?.into_projective();
        Ok(PkgPublicKey(projective))
    }
/// Returns the key with the given representation, if valid.
Returns the key with the given representation, if valid.
Returns the key with the given representation if valid .
pub fn from_bytes<B: Borrow<[u8; PK_SIZE]>>(bytes: B) -> FromBytesResult<Self> {
        let mut compressed: <G2Affine as CurveAffine>::Compressed = EncodedPoint::empty();
        compressed.as_mut().copy_from_slice(bytes.borrow());
        let opt_affine = compressed.into_affine().ok();
        let projective = opt_affine.ok_or(FromBytesError::Invalid)?.into_projective();
        Ok(PkgPublicKey(projective))
    }
pub fn from_bytes < B : Borrow < [ u8 ; PK_SIZE ] > > ( bytes : B ) -> FromBytesResult < Self > { let mut compressed : < G2Affine as CurveAffine > :: Compressed = EncodedPoint :: empty ( ) ; compressed . as_mut ( ) . copy_from_slice ( bytes . borrow ( ) ) ; let opt_affine = compressed . into_affine ( ) . ok ( ) ; let projective = opt_affine . ok_or ( FromBytesError :: Invalid ) ? . into_projective ( ) ; Ok ( PkgPublicKey ( projective ) ) }
Returns the key with the given representation, if valid.
Returns the key with the given representation if valid .
bytes
B
bytes
B