final
class
MessageCrypto extends AnyRef
Instance Constructors
-
new
MessageCrypto(key: String, json: Boolean)
-
new
MessageCrypto(key: String)
-
new
MessageCrypto(key: Array[Byte], json: Boolean = false)
Type Members
-
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
decrypt(msg: String): String
-
def
decryptAndVerify(msg: String): Option[String]
-
def
encrypt(msg: String): String
-
def
encryptAndSign(msg: String): String
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
def
hexHmac(msg: String): String
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
sign(msg: String): String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
verify(msg: String): Option[String]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Compatible with the Rails MessageEncryptor using 'aes-256-cbc' and MessageVerifier using 'sha1' when working with *String* values.
Also compatible with the custom MessageCrypto which marshalls values as JSON instead of using the ruby Marshal.dump and Marshal.load. Use json=true to dump using JSON.
MessageEncryptor uses Marshal.dump and Marshal.load on whatever values you are trying to encrypt/sign. A subset of Marshal.dump and Marshal.load have been implemented to support String values.
NOTE: This is a legacy class that was created when we switched from Rails to Scala. It is still used in a few places but probably needs to be refactored to remove the old Ruby marshalling stuff.