Packages

abstract class SignedCodec[A] extends Codec[A]

A codec that delegates through to the provided target codec but prefixes the encoded value with an HMAC signature when encoding and verifies the signature when decoding. This ensures that the encoded bits were not tampered with.

Source
SignedCodec.scala
Linear Supertypes
Codec[A], GenCodec[A, A], Decoder[A], Encoder[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SignedCodec
  2. Codec
  3. GenCodec
  4. Decoder
  5. Encoder
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SignedCodec()

Abstract Value Members

  1. abstract def signature(bits: BitVector): Attempt[ByteVector]
  2. abstract def signatureCodec: Codec[BitVector]

    The codec to use for the signature portion of the encoded bits.

  3. abstract def signingKey: SignatureKey
  4. abstract def targetCodec: Codec[A]

    Returns the underlying codec that is to be used before the signature is applied

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def :+:[B](left: Codec[B]): CoproductCodecBuilder[:+:[B, :+:[A, CNil]], ::[Codec[B], ::[Codec[A], HNil]], :+:[B, :+:[A, CNil]]]
    Definition Classes
    Codec
  4. final def <~[B](codecB: Codec[B])(implicit ev: =:=[Unit, B]): Codec[A]
    Definition Classes
    Codec
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def >>~[B](f: (A) ⇒ Codec[B]): Codec[(A, B)]
    Definition Classes
    Codec
  7. def asDecoder: Decoder[A]
    Definition Classes
    Decoder
  8. def asEncoder: Encoder[A]
    Definition Classes
    Encoder
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. final def compact: Codec[A]
    Definition Classes
    Codec → GenCodec → Encoder
  12. final def complete: Codec[A]
    Definition Classes
    Codec → GenCodec → Decoder
  13. final def consume[B](f: (A) ⇒ Codec[B])(g: (B) ⇒ A): Codec[B]
    Definition Classes
    Codec
  14. def contramap[C](f: (C) ⇒ A): GenCodec[C, A]
    Definition Classes
    GenCodec → Encoder
  15. final def decode(bits: BitVector): Attempt[DecodeResult[A]]
    Definition Classes
    SignedCodec → Decoder
  16. def decodeOnly[AA >: A]: Codec[AA]
    Definition Classes
    Codec → Decoder
  17. final def decodeValue(bits: BitVector): Attempt[A]
    Definition Classes
    Decoder
  18. final def downcast[B <: A](implicit tb: Typeable[B]): Codec[B]
    Definition Classes
    Codec
  19. final def dropLeft[B](codecB: Codec[B])(implicit ev: =:=[Unit, A]): Codec[B]
    Definition Classes
    Codec
  20. final def dropRight[B](codecB: Codec[B])(implicit ev: =:=[Unit, B]): Codec[A]
    Definition Classes
    Codec
  21. def econtramap[C](f: (C) ⇒ Attempt[A]): GenCodec[C, A]
    Definition Classes
    GenCodec → Encoder
  22. def emap[C](f: (A) ⇒ Attempt[C]): GenCodec[A, C]
    Definition Classes
    GenCodec → Decoder
  23. final def encode(a: A): Attempt[BitVector]
    Definition Classes
    SignedCodec → Encoder
  24. def encodeOnly: Codec[A]
    Definition Classes
    Encoder
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  27. final def exmap[B](f: (A) ⇒ Attempt[B], g: (B) ⇒ Attempt[A]): Codec[B]
    Definition Classes
    Codec
  28. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. def flatMap[B](f: (A) ⇒ Decoder[B]): Decoder[B]
    Definition Classes
    Decoder
  30. final def flatZip[B](f: (A) ⇒ Codec[B]): Codec[(A, B)]
    Definition Classes
    Codec
  31. final def flattenLeftPairs(implicit f: FlattenLeftPairs[A]): Codec[Out]
    Definition Classes
    Codec
  32. final def fuse[AA <: A, BB >: A](implicit ev: =:=[BB, AA]): Codec[BB]
    Definition Classes
    GenCodec
  33. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. final def hlist: Codec[::[A, HNil]]
    Definition Classes
    Codec
  36. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  37. def map[C](f: (A) ⇒ C): GenCodec[A, C]
    Definition Classes
    GenCodec → Decoder
  38. final def narrow[B](f: (A) ⇒ Attempt[B], g: (B) ⇒ A): Codec[B]
    Definition Classes
    Codec
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  41. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  42. final def pairedWith[B](codecB: Codec[B]): Codec[(A, B)]
    Definition Classes
    Codec
  43. def pcontramap[C](f: (C) ⇒ Option[A]): GenCodec[C, A]
    Definition Classes
    GenCodec → Encoder
  44. def sizeBound: SizeBound
    Definition Classes
    SignedCodec → Encoder
  45. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  46. def toField[K]: Codec[FieldType[K, A]]
    Definition Classes
    Codec
  47. def toFieldWithContext[K <: Symbol](k: K): Codec[FieldType[K, A]]
    Definition Classes
    Codec
  48. def toString(): String
    Definition Classes
    SignedCodec → AnyRef → Any
  49. final def unit(zero: A): Codec[Unit]
    Definition Classes
    Codec
  50. final def upcast[B >: A](implicit ta: Typeable[A]): Codec[B]
    Definition Classes
    Codec
  51. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  54. final def widen[B](f: (A) ⇒ B, g: (B) ⇒ Attempt[A]): Codec[B]
    Definition Classes
    Codec
  55. final def withContext(context: String): Codec[A]
    Definition Classes
    Codec
  56. final def withToString(str: ⇒ String): Codec[A]
    Definition Classes
    Codec
  57. final def xmap[B](f: (A) ⇒ B, g: (B) ⇒ A): Codec[B]
    Definition Classes
    Codec
  58. final def ~[B](codecB: Codec[B]): Codec[(A, B)]
    Definition Classes
    Codec
  59. final def ~>[B](codecB: Codec[B])(implicit ev: =:=[Unit, A]): Codec[B]
    Definition Classes
    Codec

Inherited from Codec[A]

Inherited from GenCodec[A, A]

Inherited from Decoder[A]

Inherited from Encoder[A]

Inherited from AnyRef

Inherited from Any

Ungrouped