XMPP::SCRAM
Cryptographic and validation primitives shared by SASL1 and SASL2 SCRAM.
Constants
MAX_ITERATIONS = 1000000
MIN_ITERATIONS = 4096
Class methods
calculate_response(password : String, initial_message : String, server_first_message : String, challenge : Hash(String, String), algorithm : OpenSSL::Algorithm, gs2_header : String, channel_binding_data : Bytes | Nil) : Response
Sourceparse_server_first(encoded : String, client_nonce : String, min_iterations : Int32 = MIN_ITERATIONS, max_iterations : Int32 = MAX_ITERATIONS) : ServerFirst
ameba:disable Metrics/CyclomaticComplexity
RFC 4013 requires SASLprep for SCRAM strings. NFKC normalization and the prohibited output classes that can be represented by Crystal strings are enforced here. XMPP JID preparation handles the username before this step.