Object

com.ubirch.crypto.hash

HashUtil

Related Doc: package hash

Permalink

object HashUtil

author: cvandrei since: 2016-07-28

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HashUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def bcryptBase64(data: String, rounds: Int = bcryptRoundsDefault): String

    Permalink

    Convenience method that gives us the input hashed with bcrypt as Base64 encoded string.

    Convenience method that gives us the input hashed with bcrypt as Base64 encoded string.

    data

    data to hash

    rounds

    bcrypt iterations count

    returns

    Base64 encoded string representation: bcrypt(inputData)

  6. def bcryptByteArray(data: String, rounds: Int = bcryptRoundsDefault): Array[Byte]

    Permalink

    Convenience method that gives us the hash of the input as Base64 encoded string.

    Convenience method that gives us the hash of the input as Base64 encoded string.

    data

    data to hash

    rounds

    bcrypt iterations count

    returns

    Base64 encoded string representation: bcrypt(inputData)

  7. def bcryptDigest(data: String, rounds: Int = bcryptRoundsDefault): Digest

    Permalink

    Gives us the Digest of a bcrypt hash based on which we can call all sorts of methods (including conversion to hexString or byteArray).

    Gives us the Digest of a bcrypt hash based on which we can call all sorts of methods (including conversion to hexString or byteArray).

    data

    data to hash

    rounds

    bcrypt iterations count

    returns

    digest with hashed input data

  8. def bcryptHexString(data: String, rounds: Int = bcryptRoundsDefault): String

    Permalink

    Convenience method that gives us the hash of the input as hexString.

    Convenience method that gives us the hash of the input as hexString.

    data

    data to hash

    rounds

    bcrypt iterations count

    returns

    hex string representation: bcrypt(inputData)

  9. final val bcryptRoundsDefault: Int

    Permalink
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashToBase64(byteArray: Array[Byte]): String

    Permalink

    Convenience method correctly converting a hash from byte array to a Base64 encoded string.

    Convenience method correctly converting a hash from byte array to a Base64 encoded string.

    byteArray

    hash represented as byte array

    returns

    input converted to Base64 encoded string

  17. def hashToBytes(hexString: String): Array[Byte]

    Permalink

    Convenience method correctly converting a hash from hex string to byte array.

    Convenience method correctly converting a hash from hex string to byte array.

    hexString

    hash represented as hex string

    returns

    input converted to byte array

  18. def hashToHex(byteArray: Array[Byte]): String

    Permalink

    Convenience method correctly converting a hash from byte array to hex string.

    Convenience method correctly converting a hash from byte array to hex string.

    byteArray

    hash represented as byte array

    returns

    input converted to hex string

  19. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  23. def randomSha256Hashes(elementCount: Int = Random.nextInt(30000)): Seq[String]

    Permalink

    Convenience method generating random hashes (useful for creating a genesis block or in tests).

    Convenience method generating random hashes (useful for creating a genesis block or in tests).

    elementCount

    number of randomly generated hashes

    returns

    sequence of random hashes

  24. def sha256Base64(data: String): String

    Permalink

    Convenience method that gives us the hash of the input as Base64 encoded string.

    Convenience method that gives us the hash of the input as Base64 encoded string.

    data

    data to hash

    returns

    Base64 encoded string representation: SHA-256 hash of input data

  25. def sha256ByteArray(data: String): Array[Byte]

    Permalink

    Convenience method that gives us the hash of the input as byte array.

    Convenience method that gives us the hash of the input as byte array.

    data

    data to hash

    returns

    byte array representation: SHA-256 hash of input data

  26. def sha256Digest(data: String): Digest

    Permalink

    Gives us the Digest of a hash based on which call all sorts of methods (including conversion to hexString or byteArray).

    Gives us the Digest of a hash based on which call all sorts of methods (including conversion to hexString or byteArray).

    data

    data to hash

    returns

    digest with hash of input data

  27. def sha256HexString(data: String): String

    Permalink

    Convenience method that gives us the hash of the input as hexString.

    Convenience method that gives us the hash of the input as hexString.

    data

    data to hash

    returns

    hex string representation: SHA-256 hash of input data

  28. def sha512Base64(data: String): String

    Permalink

    Convenience method that gives us the hash of the input as Base64 encoded string.

    Convenience method that gives us the hash of the input as Base64 encoded string.

    data

    data to hash

    returns

    Base64 encoded string representation: SHA-512 hash of input data

  29. def sha512ByteArray(data: String): Array[Byte]

    Permalink

    Convenience method that gives us the hash of the input as byte array.

    Convenience method that gives us the hash of the input as byte array.

    data

    data to hash

    returns

    byte array representation: SHA-512 hash of input data

  30. def sha512Digest(data: String): Digest

    Permalink

    Gives us the Digest of a hash based on which call all sorts of methods (including conversion to hexString or byteArray).

    Gives us the Digest of a hash based on which call all sorts of methods (including conversion to hexString or byteArray).

    data

    data to hash

    returns

    digest with hash of input data

  31. def sha512HexString(data: String): String

    Permalink

    Convenience method that gives us the hash of the input as hexString.

    Convenience method that gives us the hash of the input as hexString.

    data

    data to hash

    returns

    hex string representation: SHA-512 hash of input data

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped