Package io.ktor.util
Types
Stub implementation that always fails. Will be removed so no public signatures should rely on it
Specifies a key for an attribute in Attributes
Map of attributes accessible by AttributeKey in a typed manner
A map with case insensitive String keys
This implementation does only generate nonce values but doesn't validate them. This is recommended for testing only.
API marked with this annotation is internal, and it is not intended to be used outside Ktor. It could be modified or removed without any notice. Using it outside Ktor could cause undefined behaviour and/or any unexpected effects.
API marked with this annotation is experimental and is not guaranteed to be stable.
Represents a nonce manager. Its 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.
API marked with this annotation is intended to become public in the future version. Usually it means that the API can't be public at the moment of development due to compatibility guarantees restrictions.
Stateless nonce manager implementation with HMAC verification and timeout. Every nonce provided by this manager consist of a random part, timestamp and HMAC.
Functions
Append all values from the specified builder
Convert io.ktor.utils.io Input to java InputStream
Create attributes instance suitable for the particular platform
Create JVM specific attributes instance.
Create native specific attributes instance.
Create an instance of case insensitive mutable map. For internal use only.
Append a relativePath safely that means that adding any extra ..
path elements will not let access anything out of the reference directory (unless you have symbolic or hard links or multiple mount points)
Moves all bytes in this
buffer to a newly created buffer with the optionally specified size
Copy source channel to both output channels chunk by chunk.
Decode bytes from a BASE64 string encodedString
Decode ByteReadPacket from base64 format
Decode String from base64 format
Decode String from base64 format encoded in UTF-8.
Decodes a string from this
buffer with the specified charset
Launch a coroutine on coroutineContext that does deflate compression optionally doing CRC and writing GZIP header and trailer if gzip = true
Encode ByteReadPacket in base64 format
Encode ByteArray in base64 format
Encode String in base64 format and UTF-8 character encoding.
Encode bytes as a BASE64 string
Escapes the characters in a String using HTML entities
Create a new instance of StringValues filtered by the specified predicate
Copy values to a list of pairs
Invoke block function for every value pair
Generates a nonce string. Could block if the system's entropy source is empty
Generates a nonce bytes of size. Could block if the system's entropy source is empty
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
Check if Char is in lower case
Moves bytes from this
buffer to the destination buffer
Moves bytes from this
buffer into newly created ByteArray and returns it
Remove all redundant .
and ..
path elements. Leading ..
are also considered redundant.
Print Job children tree.
Adds all attributes from another collection, replacing original values if any.
Supervisor with empty coroutine exception handler ignoring all exceptions.
Split source ByteReadChannel into 2 new one. Cancel of one channel in split(input or both outputs) cancels other channels.
Read channel to byte array.
Does the same as the regular toLowerCase except that locale-specific rules are not applied to ASCII characters so latin characters are converted by the original english rules.
Does the same as the regular toUpperCase except that locale-specific rules are not applied to ASCII characters so latin characters are converted by the original english rules.
Build an empty StringValues instance.
Build an instance of StringValues from a vararg list of pairs
Build an instance of StringValues from the specified map
Build an instance of StringValues from a single pair
Build an instance of StringValues with a single name and multiple values