scram

package
v0.0.0-...-15ac6bc Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Implementation of SCRAM (RFC 5802)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Username string

	ServerKey []byte // HMAC(SaltedPassword, "Server Key")
	StoredKey []byte // H(ClientKey)
	Salt      []byte
	Iteration int
	// contains filtered or unexported fields
}

func NewCredential

func NewCredential(hash func() hash.Hash, uname, pass string, salt []byte, iter int) *Credential

type Scram

type Scram struct {
	// contains filtered or unexported fields
}

func New

func New(db *sql.DB, h func() hash.Hash) *Scram

func (*Scram) Authn

func (s *Scram) Authn() string

func (*Scram) GenServerFinal

func (s *Scram) GenServerFinal() ([]byte, error)

func (*Scram) GenServerFirst

func (s *Scram) GenServerFirst() []byte

func (*Scram) Next

func (s *Scram) Next(clientResponse []byte) (challenge []byte, err error)

func (*Scram) ParseClientFinal

func (s *Scram) ParseClientFinal(m string) error

func (*Scram) ParseClientFirst

func (s *Scram) ParseClientFirst(m string) error

Jump to

Keyboard shortcuts

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