Function deserialize_scalars

Source
pub fn deserialize_scalars<G: Group>(
    data: &[u8],
    count: usize,
) -> Option<Vec<G::Scalar>>
Expand description

Deserialize a byte slice into a vector of scalar field elements.

§Parameters

  • data: A byte slice containing the serialized scalars in little-endian order.
  • count: The number of scalars to deserialize.

§Returns

  • Some(Vec<G::Scalar>): The deserialized scalars if all are valid.
  • None: If the byte slice length is incorrect or any scalar is invalid.