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

sigma.serialization.ProveDlogSerializer.scala Maven / Gradle / Ivy

The newest version!
package sigma.serialization

import sigma.crypto.EcPointType
import sigma.data.ProveDlog

case class ProveDlogSerializer(cons: EcPointType => ProveDlog)
  extends CoreSerializer[ProveDlog, ProveDlog] {

  override def serialize(obj: ProveDlog, w: CoreByteWriter): Unit =
    GroupElementSerializer.serialize(obj.value, w)

  override def parse(r: CoreByteReader) = {
    val res = GroupElementSerializer.parse(r)
    cons(res)
  }
}








© 2015 - 2025 Weber Informatics LLC | Privacy Policy