object
Stub implementation that always fails. Will be removed so no public signatures should rely on it |
|
class AttributeKey<T>
Specifies a key for an attribute in Attributes |
|
interface Attributes
Map of attributes accessible by AttributeKey in a typed manner |
|
class CaseInsensitiveMap<Value> : MutableMap<String, Value>
A map with case insensitive String keys |
|
interface Digest
Stateful digest class specified to calculate digest. |
|
interface Encoder
Content encoder. |
|
object GenerateOnlyNonceManager : NonceManager
This implementation does only generate nonce values but doesn't validate them. This is recommended for testing only. |
|
object Hash |
|
object Identity : Encoder
Empty Encoder |
|
expect class Lock |
|
expect class LockTicket |
|
interface NonceManager
Represents a nonce manager. It's responsibility is to produce nonce values and verify nonce values from untrusted sources that they are provided by this manager. This is usually required in web environment to mitigate CSRF attacks. Depending on it's underlying implementation it could be stateful or stateless. Note that there is usually some timeout for nonce values to reduce memory usage and to avoid replay attacks. Nonce length is unspecified. |
|
expect class ReadWriteLock |
|
class StatelessHmacNonceManager : NonceManager
Stateless nonce manager implementation with HMAC verification and timeout. Every nonce provided by this manager consist of a random part, timestamp and HMAC. |
|
interface StringValues
Provides data structure for associating a String with a List of Strings |
|
open class StringValuesBuilder |
|
open class StringValuesImpl : StringValues |
|
open class StringValuesSingleImpl : StringValues |
annotation class InternalAPI
API marked with this annotation is ktor internal and it is not intended to be used outside. It could be modified or removed without any notice. Using it outside of ktor could cause undefined behaviour and/or any strange effects. |
|
annotation class KtorExperimentalAPI
API marked with this annotation is experimental and is not guaranteed to be stable. |
val Deflate: Encoder
Implementation of Deflate Encoder. |
|
val GZip: Encoder
Implementation of GZip Encoder. |
|
val GreenwichMeanTime: ZoneId
ZoneId for GMT |
|
val |
expect fun Attributes(concurrent: Boolean = false): Attributes
Create attributes instance suitable for the particular platform |
|
expect fun Digest(name: String): Digest
|
|
fun StringValuesBuilder.appendAll(builder: StringValuesBuilder): StringValuesBuilder
Append all values from the specified builder |
|
fun StringValuesBuilder.appendFiltered(source: StringValues, keepEmpty: Boolean = false, predicate: (String, String) -> Boolean): Unit
Append values from source filtering values by the specified predicate |
|
suspend fun Digest.build(bytes: ByteArray): ByteArray
Calculate digest from current state and specified bytes. suspend fun Digest.build(string: String, charset: Charset = Charsets.UTF_8): ByteArray
Calculate digest from current state and specified string. |
|
fun <Value> caseInsensitiveMap(): MutableMap<String, Value>
Create an instance of case insensitive mutable map. For internal use only. |
|
fun StringValues.filter(keepEmpty: Boolean = false, predicate: (String, String) -> Boolean): StringValues
Create a new instance of StringValues filtered by the specified predicate |
|
fun StringValues.flattenEntries(): List<Pair<String, String>>
Copy values to a list of pairs |
|
fun StringValues.flattenForEach(block: (String, String) -> Unit): Unit
Invoke block function for every value pair |
|
expect fun generateNonce(): String
Generates a nonce string. Could block if the system's entropy source is empty fun generateNonce(size: Int): ByteArray
Generates a nonce bytes of size. Could block if the system's entropy source is empty |
|
fun
Create a digest function with the specified algorithm and salt fun getDigestFunction(algorithm: String, salt: (value: String) -> String): (String) -> ByteArray
Create a digest function with the specified algorithm and salt provider. |
|
fun hex(bytes: ByteArray): String
Encode bytes as a HEX string with no spaces, newlines and fun hex(s: String): ByteArray
Decode bytes from HEX string. It should be no spaces and |
|
fun
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty |
|
fun
Encode string as UTF-8 bytes |
|
expect fun sha1(bytes: ByteArray): ByteArray
Compute SHA-1 hash for the specified bytes |
|
fun StringValues.toMap(): Map<String, List<String>>
Copy values to a new independent map |
|
fun <R> Lock.use(block: () -> R): R |
|
fun valuesOf(vararg pairs: Pair<String, List<String>>, caseInsensitiveKey: Boolean = false): StringValues
Build an instance of StringValues from a vararg list of pairs fun valuesOf(name: String, value: String, caseInsensitiveKey: Boolean = false): StringValues
Build an instance of StringValues from a single pair fun valuesOf(name: String, values: List<String>, caseInsensitiveKey: Boolean = false): StringValues
Build an instance of StringValues with a single name and multiple values fun valuesOf(): StringValues
Build an empty StringValues instance. fun valuesOf(map: Map<String, Iterable<String>>, caseInsensitiveKey: Boolean = false): StringValues
Build an instance of StringValues from the specified map |