message: Change ed25519_batch_verify signature for convenience
diff: @@ -79,14 +79,14 @@ pub fn ed25519_verify(message: &[u8], signature: &[u8], public_key: &[u8]) -> Cr
  /// In the limiting case where all signatures in the batch are made with the same verification key,
  /// coalesced batch verification runs twice as fast as ordinary batch verification.
  pub fn ed25519_batch_verify(
  - messages: &[&[u8]],
  - signatures: &[&[u8]],
  - pubkeys: &[&[u8]],
  + messages: &[Vec<u8>],
  + signatures: &[Vec<u8>],
  + public_keys: &[Vec<u8>],
  ) -> CryptoResult<bool> {
  let mut batch = ed25519::batch::Verifier::new();
  - for (((i, &message), &signature), &public_key) in
  - (1..).zip(messages).zip(signatures).zip(pubkeys)
  + for (((i, message), signature), public_key) in
  + (1..).zip(messages).zip(signatures).zip(public_keys)
  {
  // Validation
  if message.len() > MESSAGE_MAX_LEN {
  @@ -115,11 +115,12 @@ pub fn ed25519_batch_verify(
  }
  // Deserialization
  - let signature = ed25519::Signature::try_from(signature).map_err(|err| {
  + let signature = ed25519::Signature::try_from(signature.as_slice()).map_err(|err| {
  CryptoError::generic_err(format!("signature {}: {}", i, err.to_string()))
  })?;
  - let public_key = ed25519::VerificationKey::try_from(public_key).map_err(|err| {
  + let public_key =
  + ed25519::VerificationKey::try_from(public_key.as_slice()).map_err(|err| {
  CryptoError::generic_err(format!("public key {}: {}", i, err.to_string()))
  })?;
  @@ -290,11 +291,7 @@ mod tests {
  public_keys.push(public_key);
  }
  - let messages: Vec<&[u8]> = messages.iter().map(|m| m.as_slice()).collect();
  - let signatures: Vec<&[u8]> = signatures.iter().map(|m| m.as_slice()).collect();
  - let pubkeys: Vec<&[u8]> = public_keys.iter().map(|m| m.as_slice()).collect();
  -
  // ed25519_batch_verify() works
  - assert!(ed25519_batch_verify(&messages, &signatures, &pubkeys).unwrap());
  + assert!(ed25519_batch_verify(&messages, &signatures, &public_keys).unwrap());
  }
  }
  