gocbcore

package
v10.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

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-{SHA-1,etc} client per RFC5802. http://tools.ietf.org/html/rfc5802

func NewClient

func NewClient(newHash func() hash.Hash, user, pass string) *Client

NewClient returns a new instance of the SCRAM client.

func (*Client) Err

func (c *Client) Err() error

Err returns the error that occurred, or nil if there were no errors.

func (*Client) Out

func (c *Client) Out() []byte

Out returns the data to be sent to the server in the current step.

func (*Client) SetNonce

func (c *Client) SetNonce(nonce []byte)

SetNonce sets the client nonce to the provided value. If not set, the nonce is generated automatically out of crypto/rand on the first step.

func (*Client) Step

func (c *Client) Step(in []byte) bool

Step processes the incoming data from the server and makes the next round of data for the server available via Client.Out. Step returns false if there are no errors and more data is still expected.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL