SessionTransportTransformerMessageAuthentication

class SessionTransportTransformerMessageAuthentication : 
    SessionTransportTransformer

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

<init>

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

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.

Properties

algorithm

val algorithm: String

is a message authentication algorithm name

keySpec

val keySpec: SecretKeySpec

is a secret key spec for message authentication

Functions

transformRead

fun transformRead(transportValue: String): String?

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

transformWrite

fun transformWrite(transportValue: String): String

Apply a transformation for transportValue representing a session.