SessionTransportTransformerMessageAuthentication

Session transformer that appends an algorithm MAC (Message Authentication Code) hash of the input. Where the input is either a session contents or a previous transformation. It uses a specified keySpec when generating the Mac hash.

Constructors

fun SessionTransportTransformerMessageAuthentication(key: ByteArray, algorithm: String = "HmacSHA256")
fun SessionTransportTransformerMessageAuthentication(keySpec: SecretKeySpec, algorithm: String = "HmacSHA256")

Functions

Link copied to clipboard
open override fun transformRead(transportValue: String): String?

Un-apply a transformation for transportValue representing a transformed session. Returns null if it fails.

Link copied to clipboard
open override fun transformWrite(transportValue: String): String

Apply a transformation for transportValue representing a session.

Properties

Link copied to clipboard
val algorithm: String

is a message authentication algorithm name

Link copied to clipboard
val keySpec: SecretKeySpec

is a secret key spec for message authentication