scodec

SignatureCodec

class SignatureCodec[A] extends Codec[A]

Codec that includes a signature of the encoded bits.

Encoding a value of type A is delegated to the specified codec and then a signature of those bits is appended using the specified signature factory to perform signing.

Decoding first decodes using the specified codec and then all of the remaining bits are treated as the signature of the decoded bits. The signature is verified and if it fails to verify, an error is returned.

Note: because decoding is first delegated to the specified code, care must be taken to ensure that codec does not consume the signature bits. For example, if the target codec is an unbounded string (e.g., ascii, utf8), decoding an encoded vector will result in the string codec trying to decode the signature bits as part of the string.

Linear Supertypes
Codec[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SignatureCodec
  2. Codec
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SignatureCodec(codec: Codec[A])(implicit signatureFactory: SignatureFactory)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def >>~[B](f: (A) ⇒ Codec[B]): Codec[(A, B)]

    Operator alias for flatZip.

    Operator alias for flatZip.

    Definition Classes
    Codec
  7. final def as[B](implicit iso: Iso[B, A]): Codec[B]

    Returns a new codec that encodes/decodes a value of type B by using an iso between A and B.

    Returns a new codec that encodes/decodes a value of type B by using an iso between A and B.

    Definition Classes
    Codec
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def decode(buffer: BitVector): \/[Error, (BitVector, A)]

    Attempts to decode a value of type A from the specified bit vector.

    Attempts to decode a value of type A from the specified bit vector.

    Definition Classes
    SignatureCodecCodec
  11. def encode(a: A): \/[Error, BitVector]

    Attempts to encode the specified value in to a bit vector.

    Attempts to encode the specified value in to a bit vector.

    Definition Classes
    SignatureCodecCodec
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. final def flatZip[B](f: (A) ⇒ Codec[B]): Codec[(A, B)]

    Returns a new codec that encodes/decodes a value of type (A, B) where the codec of B is dependent on A.

    Returns a new codec that encodes/decodes a value of type (A, B) where the codec of B is dependent on A.

    Definition Classes
    Codec
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def hlist: Codec[::[A, HNil]]

    Lifts this codec in to a codec of a singleton hlist, which allows easy binding to case classes of one argument.

    Lifts this codec in to a codec of a singleton hlist, which allows easy binding to case classes of one argument.

    Definition Classes
    Codec
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. final def xmap[B](f: (A) ⇒ B, g: (B) ⇒ A): Codec[B]

    Maps to a codec of type B.

    Maps to a codec of type B.

    Definition Classes
    Codec

Inherited from Codec[A]

Inherited from AnyRef

Inherited from Any

Ungrouped