module XMPP::ScramDowngradeProtection

Overview

XEP-0474: SASL SCRAM Downgrade Protection

Defined in:

xmpp/auth/scram_downgrade_protection.cr

Constant Summary

RECORD_SEPARATOR = '\u001E'
UNIT_SEPARATOR = '\u001F'

Class Method Summary

Class Method Detail

def self.calculate_hash(mechanisms : Array(String), channel_binding_types : Array(String), algorithm : OpenSSL::Algorithm) : String #

[View source]
def self.check_downgrade(selected_mechanism : AuthMechanism, available_mechanisms : Array(String), tls_available : Bool) : Bool #

Retained as a public policy helper for callers selecting mechanisms.


[View source]
def self.select_mechanism(preferred_order : Array(AuthMechanism), available_mechanisms : Array(String), tls_available : Bool) : AuthMechanism | Nil #

[View source]
def self.verify!(server_hash : String | Nil, mechanisms : Array(String), channel_binding_types : Array(String), algorithm : OpenSSL::Algorithm) : Nil #

[View source]