fm.common

Crypto

final class Crypto extends Logging

A Simple Crypto Class

NOTE: Use at your own risk. We make no claim that any of this Crypto code is correct.

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Crypto
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Crypto(base64Key: String)

    Annotations
    @deprecated
    Deprecated

    (Since version ) Use the Crypto object factory methods instead of directly calling this constructor. e.g. Crypto.defaultCipherForRawKey or Crypto.defaultCipherForBase64Key

  2. new Crypto(key: Array[Byte])

    Annotations
    @deprecated
    Deprecated

    (Since version ) Use the Crypto object factory methods instead of directly calling this constructor. e.g. Crypto.defaultCipherForRawKey or Crypto.defaultCipherForBase64Key

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 asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def decrypt(iv: Array[Byte], ciphertext: Array[Byte]): Array[Byte]

    Decrypt given the IV and Ciphertext

  9. def decrypt(ivAndCiphertext: Array[Byte]): Array[Byte]

    Decrypt given the combined IV and Ciphertext

  10. def decryptBase64String(base64IvAndCiphertext: String): String

    Decrypt a string encrypted using encryptBase64String()

  11. def encrypt(plaintext: Array[Byte]): Array[Byte]

    Encrypt bytes returning the iv and ciphertext combined into a single byte array (iv followed by the cipher text)

  12. def encryptBase64String(plaintext: String, urlSafe: Boolean): String

  13. def encryptBase64String(plaintext: String): String

  14. def encryptBase64StringURLSafe(plaintext: String): String

  15. def encryptRaw(plaintext: Array[Byte]): (Array[Byte], Array[Byte])

    Encrypt Bytes returning the tuple: (iv, ciphertext)

  16. def encryptRaw(plaintext: String): (Array[Byte], Array[Byte])

    Encrypt a string returning the tuple: (iv, ciphertext)

  17. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. lazy val logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  24. def mac(data: Array[Byte]): Array[Byte]

    Calculate the MAC for an array of bytes

  25. def macBase64(data: Array[Byte], urlSafe: Boolean): String

  26. def macBase64(data: Array[Byte]): String

    The Base64 Encoded MAC for an array of bytes

  27. def macBase64(data: String, urlSafe: Boolean): String

  28. def macBase64(data: String): String

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

  30. def macBase64URLSafe(data: String): String

  31. def macHex(data: Array[Byte]): String

    The Hex Encoded MAC for an array of bytes

  32. def macHex(data: String): String

    The Hex Encoded MAC for a String

  33. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    AnyRef → Any
  38. def tryDecrypt(iv: Array[Byte], ciphertext: Array[Byte]): Option[Array[Byte]]

  39. def tryDecrypt(ivAndCiphertext: Array[Byte]): Option[Array[Byte]]

  40. def tryDecryptBase64String(base64IvAndCiphertext: String): Option[String]

    Attempt to decrypt a string encrypted using encryptBase64String()

    Attempt to decrypt a string encrypted using encryptBase64String()

    If successful then Some(plaintext) will be returned. Otherwise None will be returned.

  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped