Versions in this module Expand all Collapse all v2 v2.0.1 Mar 29, 2023 v2.0.0 Mar 29, 2023 Changes in this version + const SaltLength + var ErrClientNotReady = errors.New("server's public ephemeral key (B) must be set first") + var ErrServerNoReady = errors.New("client's public ephemeral key (A) must be set first") + var RFC5054Group1024 = &Group + var RFC5054Group1536 = &Group + var RFC5054Group2048 = &Group + var RFC5054Group3072 = &Group + var RFC5054Group4096 = &Group + var RFC5054Group6144 = &Group + var RFC5054Group8192 = &Group + func NFKD(str string) string + func NewSalt() []byte + func RFC5054KDF(username, password string, salt []byte) ([]byte, error) + type Client struct + func NewClient(params *Params, username, password string, salt []byte) (*Client, error) + func (c *Client) A() []byte + func (c *Client) CheckM2(M2 []byte) (bool, error) + func (c *Client) ComputeM1() ([]byte, error) + func (c *Client) SessionKey() ([]byte, error) + func (c *Client) SetB(public []byte) error + type Group struct + ExponentSize int + Generator *big.Int + ID string + N *big.Int + type KDF func(username, password string, salt []byte) ([]byte, error) + type Params struct + Group *Group + Hash crypto.Hash + KDF KDF + Name string + func (p *Params) String() string + type Server struct + func NewServer(params *Params, username string, salt, verifier []byte) (*Server, error) + func RestoreServer(params *Params, state []byte) (*Server, error) + func (s *Server) B() []byte + func (s *Server) CheckM1(M1 []byte) (bool, error) + func (s *Server) ComputeM2() ([]byte, error) + func (s *Server) MarshalJSON() ([]byte, error) + func (s *Server) Reset(params *Params, username string, salt, verifier []byte) error + func (s *Server) Save() ([]byte, error) + func (s *Server) SessionKey() ([]byte, error) + func (s *Server) SetA(public []byte) error + func (s *Server) UnmarshalJSON(data []byte) error + type Triplet []byte + func ComputeVerifier(params *Params, username, password string, salt []byte) (Triplet, error) + func NewTriplet(username string, salt, verifier []byte) Triplet + func (t Triplet) MarshalJSON() ([]byte, error) + func (t Triplet) Salt() []byte + func (t Triplet) Username() string + func (t Triplet) Verifier() []byte