Class/Object

nelson.crypto.protocol

SignedCodec

Related Docs: object SignedCodec | package protocol

Permalink

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()

    Permalink

Abstract Value Members

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

    Permalink
  2. abstract def signatureCodec: Codec[BitVector]

    Permalink

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

  3. abstract def signingKey: SignatureKey

    Permalink
  4. abstract def targetCodec: Codec[A]

    Permalink

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

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def :+:[B](left: Codec[B]): CoproductCodecBuilder[:+:[B, :+:[A, CNil]], ::[Codec[B], ::[Codec[A], HNil]], :+:[B, :+:[A, CNil]]]

    Permalink
    Definition Classes
    Codec
  4. final def <~[B](codecB: Codec[B])(implicit ev: =:=[Unit, B]): Codec[A]

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

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

    Permalink
    Definition Classes
    Codec
  7. def asDecoder: Decoder[A]

    Permalink
    Definition Classes
    Decoder
  8. def asEncoder: Encoder[A]

    Permalink
    Definition Classes
    Encoder
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def compact: Codec[A]

    Permalink
    Definition Classes
    Codec → GenCodec → Encoder
  12. final def complete: Codec[A]

    Permalink
    Definition Classes
    Codec → GenCodec → Decoder
  13. final def consume[B](f: (A) ⇒ Codec[B])(g: (B) ⇒ A): Codec[B]

    Permalink
    Definition Classes
    Codec
  14. def contramap[C](f: (C) ⇒ A): GenCodec[C, A]

    Permalink
    Definition Classes
    GenCodec → Encoder
  15. final def decode(bits: BitVector): Attempt[DecodeResult[A]]

    Permalink
    Definition Classes
    SignedCodec → Decoder
  16. def decodeOnly[AA >: A]: Codec[AA]

    Permalink
    Definition Classes
    Codec → Decoder
  17. final def decodeValue(bits: BitVector): Attempt[A]

    Permalink
    Definition Classes
    Decoder
  18. final def downcast[B <: A](implicit tb: Typeable[B]): Codec[B]

    Permalink
    Definition Classes
    Codec
  19. final def dropLeft[B](codecB: Codec[B])(implicit ev: =:=[Unit, A]): Codec[B]

    Permalink
    Definition Classes
    Codec
  20. final def dropRight[B](codecB: Codec[B])(implicit ev: =:=[Unit, B]): Codec[A]

    Permalink
    Definition Classes
    Codec
  21. def econtramap[C](f: (C) ⇒ Attempt[A]): GenCodec[C, A]

    Permalink
    Definition Classes
    GenCodec → Encoder
  22. def emap[C](f: (A) ⇒ Attempt[C]): GenCodec[A, C]

    Permalink
    Definition Classes
    GenCodec → Decoder
  23. final def encode(a: A): Attempt[BitVector]

    Permalink
    Definition Classes
    SignedCodec → Encoder
  24. def encodeOnly: Codec[A]

    Permalink
    Definition Classes
    Encoder
  25. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def exmap[B](f: (A) ⇒ Attempt[B], g: (B) ⇒ Attempt[A]): Codec[B]

    Permalink
    Definition Classes
    Codec
  28. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. def flatMap[B](f: (A) ⇒ Decoder[B]): Decoder[B]

    Permalink
    Definition Classes
    Decoder
  30. final def flatZip[B](f: (A) ⇒ Codec[B]): Codec[(A, B)]

    Permalink
    Definition Classes
    Codec
  31. final def flattenLeftPairs(implicit f: FlattenLeftPairs[A]): Codec[Out]

    Permalink
    Definition Classes
    Codec
  32. final def fuse[AA <: A, BB >: A](implicit ev: =:=[BB, AA]): Codec[BB]

    Permalink
    Definition Classes
    GenCodec
  33. final def getClass(): Class[_]

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

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

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

    Permalink
    Definition Classes
    Any
  37. def map[C](f: (A) ⇒ C): GenCodec[A, C]

    Permalink
    Definition Classes
    GenCodec → Decoder
  38. final def narrow[B](f: (A) ⇒ Attempt[B], g: (B) ⇒ A): Codec[B]

    Permalink
    Definition Classes
    Codec
  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. final def pairedWith[B](codecB: Codec[B]): Codec[(A, B)]

    Permalink
    Definition Classes
    Codec
  43. def pcontramap[C](f: (C) ⇒ Option[A]): GenCodec[C, A]

    Permalink
    Definition Classes
    GenCodec → Encoder
  44. def sizeBound: SizeBound

    Permalink
    Definition Classes
    SignedCodec → Encoder
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  46. def toField[K]: Codec[FieldType[K, A]]

    Permalink
    Definition Classes
    Codec
  47. def toFieldWithContext[K <: Symbol](k: K): Codec[FieldType[K, A]]

    Permalink
    Definition Classes
    Codec
  48. def toString(): String

    Permalink
    Definition Classes
    SignedCodec → AnyRef → Any
  49. final def unit(zero: A): Codec[Unit]

    Permalink
    Definition Classes
    Codec
  50. final def upcast[B >: A](implicit ta: Typeable[A]): Codec[B]

    Permalink
    Definition Classes
    Codec
  51. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def widen[B](f: (A) ⇒ B, g: (B) ⇒ Attempt[A]): Codec[B]

    Permalink
    Definition Classes
    Codec
  55. final def withContext(context: String): Codec[A]

    Permalink
    Definition Classes
    Codec
  56. final def withToString(str: ⇒ String): Codec[A]

    Permalink
    Definition Classes
    Codec
  57. final def xmap[B](f: (A) ⇒ B, g: (B) ⇒ A): Codec[B]

    Permalink
    Definition Classes
    Codec
  58. final def ~[B](codecB: Codec[B]): Codec[(A, B)]

    Permalink
    Definition Classes
    Codec
  59. final def ~>[B](codecB: Codec[B])(implicit ev: =:=[Unit, A]): Codec[B]

    Permalink
    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