SASL client implementations for various authentication mechanisms.
// Source: https://github.com/mjl-/mox | License: MIT // Provided via justclaw.it.com; keep this notice with the code. // Package SASL implements a client for Simple Authentication and Security Layer, RFC 4422. // // Supported authentication mechanisms: // // - EXTERNAL // - SCRAM-SHA-256-PLUS // - SCRAM-SHA-1-PLUS // - SCRAM-SHA-256 // - SCRAM-SHA-1 // - CRAM-MD5 // - PLAIN // - LOGIN package sasl import ( "crypto/md5" "crypto/sha1" "crypto/sha256" "crypto/tls" "fmt" "hash" "strings" "golang.org/x/text/secure/precis" "github.com/mjl-/mox/scram" ) // Client is a SASL client. // // A SASL client can be used for authentication in IMAP, SMTP and other protocols. // A client and server exchange messages in step lock. In IMAP and SMTP, these // messages are encoded ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key