SessionTransportTransformerDigest

class SessionTransportTransformerDigest : 
    SessionTransportTransformer

Deprecated: This authentication kind is potentially vulnerable with several hash functions. Use SessionTransportTransformerMessageAuthentication instead or ensure you are using secure enough hash.

Session transformer that appends an algorithm hash of the input. Where the input is either a session contents or a previous transformation. It prepends a salt when computing the hash.

Constructors

<init>

SessionTransportTransformerDigest(
    salt: String = "ktor",
    algorithm: String = "SHA-384")

Session transformer that appends an algorithm hash of the input. Where the input is either a session contents or a previous transformation. It prepends a salt when computing the hash.

Properties

algorithm

val algorithm: String

is a message digest algorithm

salt

val salt: String

that is used for message digest algorithm

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.