All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.stratalab.consensus.models.SignatureKesSumValidator.scala Maven / Gradle / Ivy

The newest version!
package xyz.stratalab.consensus.models

object SignatureKesSumValidator extends scalapb.validate.Validator[xyz.stratalab.consensus.models.SignatureKesSum] {
  def validate(input: xyz.stratalab.consensus.models.SignatureKesSum): scalapb.validate.Result =
    scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("SignatureKesSum.verificationKey", input.verificationKey, 32)) &&
    scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("SignatureKesSum.signature", input.signature, 64)) &&
    scalapb.validate.Result.repeated(input.witness.iterator) { _value =>
      scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("SignatureKesSum.witness", _value, 32))
    }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy