Packages

class HashBuilderFromMessageDigest extends HashBuilder

Constructs a HashBuilder from the specified java.security.MessageDigest ALWAYS use the apply method unless you know what you're doing.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HashBuilderFromMessageDigest
  2. HashBuilder
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(a: Long): HashBuilderFromMessageDigest.this.type

    Shorthand for addWithoutLengthPrefix(DeterministicEncoding.encodeLong(a))

    Shorthand for addWithoutLengthPrefix(DeterministicEncoding.encodeLong(a))

    Definition Classes
    HashBuilder
  5. def add(a: Int): HashBuilderFromMessageDigest.this.type

    Shorthand for addWithoutLengthPrefix(DeterministicEncoding.encodeInt(a))

    Shorthand for addWithoutLengthPrefix(DeterministicEncoding.encodeInt(a))

    Definition Classes
    HashBuilder
  6. def add(a: String): HashBuilderFromMessageDigest.this.type

    Shorthand for add(ByteString.copyFromUtf8(a))

    Shorthand for add(ByteString.copyFromUtf8(a))

    Definition Classes
    HashBuilder
  7. def add(a: ByteString, context: => String): HashBuilderFromMessageDigest.this.type

    Same as add but with an additional context.

    Same as add but with an additional context. The context is used by a com.digitalasset.canton.protocol.hash.HashTracer to trace hashing steps.

    Definition Classes
    HashBuilder
  8. def add(a: ByteString): HashBuilderFromMessageDigest.this.type

    Appends the length of a (encoded as fixed length com.google.protobuf.ByteString) as well as a to this builder.

    Appends the length of a (encoded as fixed length com.google.protobuf.ByteString) as well as a to this builder.

    returns

    the updated hash builder

    Definition Classes
    HashBuilder
    Exceptions thrown

    java.lang.IllegalStateException if the finish method has already been called on this HashBuilder

  9. def addByte(byte: Byte, context: (Byte) => String): HashBuilderFromMessageDigest.this.type
  10. def addWithoutLengthPrefix(a: ByteString): HashBuilderFromMessageDigest.this.type

    Appends a com.google.protobuf.ByteString a to the sequence of bytes to be hashed.

    Appends a com.google.protobuf.ByteString a to the sequence of bytes to be hashed. Use add for com.google.protobuf.ByteStrings of variable length to prevent hash collisions due to concatenation of variable-length strings.

    Document at the call site in production code why it is not necessary to include a length prefix.

    returns

    the updated hash builder

    Definition Classes
    HashBuilderFromMessageDigestHashBuilder
    Exceptions thrown

    java.lang.IllegalStateException if the finish method has already been called on this HashBuilder

  11. def addWithoutLengthPrefix(a: Array[Byte]): HashBuilderFromMessageDigest.this.type

    Shorthand for addWithoutLengthPrefix(ByteString.copyFrom(a))

    Shorthand for addWithoutLengthPrefix(ByteString.copyFrom(a))

    Definition Classes
    HashBuilderFromMessageDigestHashBuilder
  12. def addWithoutLengthPrefix(a: String): HashBuilderFromMessageDigest.this.type

    Shorthand for addWithoutLengthPrefix(ByteString.copyFromUtf8(a)) Use add for strings of variable length to prevent hash collisions due to concatenation of variable-length strings.

    Shorthand for addWithoutLengthPrefix(ByteString.copyFromUtf8(a)) Use add for strings of variable length to prevent hash collisions due to concatenation of variable-length strings.

    Document at the call site in production code why it is not necessary to include a length prefix.

    Definition Classes
    HashBuilder
  13. def addWithoutLengthPrefixWithContext(a: ByteString, context: => String): HashBuilderFromMessageDigest.this.type

    Same as addWithoutLengthPrefix but takes an additional context argument.

    Same as addWithoutLengthPrefix but takes an additional context argument. The context is used by a com.digitalasset.canton.protocol.hash.HashTracer to trace hashing steps.

    Definition Classes
    HashBuilderFromMessageDigestHashBuilder
  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. def finish(): Hash

    Terminates the building of the hash.

    Terminates the building of the hash. No more additions can be made using HashBuilder.addWithoutLengthPrefix after this method has been called.

    returns

    The hash of the array accumulated so far.

    Definition Classes
    HashBuilderFromMessageDigestHashBuilder
    Exceptions thrown

    java.lang.IllegalStateException if finish had been called before on this HashBuilder

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  25. lazy val purposeByteArray: Array[Byte]
    Attributes
    protected
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from HashBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped