Documentation ¶
Overview ¶
Pacakage scram implements a SCRAM-{SHA-1,etc} client per RFC5802.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements a SCRAM-* client (SCRAM-SHA-1, SCRAM-SHA-256, etc).
A Client may be used within a SASL conversation with logic resembling:
var in []byte var client = scram.NewClient(sha1.New, user, pass) for client.Step(in) { out := client.Out() // send out to server in := serverOut } if client.Err() != nil { // auth failed }
func NewClient ¶
NewClient returns a new SCRAM-* client with the provided hash algorithm.
For SCRAM-SHA-1, for example, use:
client := scram.NewClient(sha1.New, user, pass)
Click to show internal directories.
Click to hide internal directories.