Documentation ¶
Index ¶
- Constants
- type AuthService
- func (s *AuthService) FinishHandshake(token string, clientProof []byte) ([]byte, error)
- func (s *AuthService) RegisterNewUser(login string) (*UserInfo, error)
- func (s *AuthService) SaveVerifier(login string, verifier []byte) error
- func (s *AuthService) StartHandshake(login string, clientEphemeral []byte) (*HandshakeInfo, error)
- func (s *AuthService) VerifySignature(token string, sig []byte, body []byte) bool
- type HandshakeInfo
- type HandshakeReq
- type HandshakeRes
- type SaltReq
- type SaltRes
- type SessionInfo
- type SessionReq
- type SessionRes
- type Suite
- func (s *Suite) GenClientEphemeralKey(p, a []byte)
- func (s *Suite) GenClientSessionKey(a, A, B, p, salt []byte) []byte
- func (s *Suite) GenClientSessionKeyProof(l, salt, A, B, key []byte) []byte
- func (s *Suite) GenRandVal(p []byte) error
- func (s *Suite) GenServerEphemeralKey(p, b, v []byte)
- func (s *Suite) GenServerSessionKey(b, A, B, v []byte) []byte
- func (s *Suite) GenServerSessionKeyProof(A, clientProof, key []byte) []byte
- func (s *Suite) GenVerifier(v, password, salt []byte)
- type UserInfo
- type VerifierReq
Constants ¶
View Source
const (
KeyLen = 256
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService() *AuthService
func (*AuthService) FinishHandshake ¶
func (s *AuthService) FinishHandshake(token string, clientProof []byte) ([]byte, error)
func (*AuthService) RegisterNewUser ¶
func (s *AuthService) RegisterNewUser(login string) (*UserInfo, error)
func (*AuthService) SaveVerifier ¶
func (s *AuthService) SaveVerifier(login string, verifier []byte) error
func (*AuthService) StartHandshake ¶
func (s *AuthService) StartHandshake(login string, clientEphemeral []byte) (*HandshakeInfo, error)
func (*AuthService) VerifySignature ¶
func (s *AuthService) VerifySignature(token string, sig []byte, body []byte) bool
type HandshakeInfo ¶
type HandshakeInfo struct {
// contains filtered or unexported fields
}
func (*HandshakeInfo) ConvertToResponse ¶
func (h *HandshakeInfo) ConvertToResponse() HandshakeRes
type HandshakeReq ¶
type HandshakeRes ¶
type SessionInfo ¶
type SessionInfo struct {
// contains filtered or unexported fields
}
type SessionReq ¶
type SessionRes ¶
type SessionRes struct {
ServerSessionKeyProof string `json:"M"`
}
type Suite ¶
func (*Suite) GenClientEphemeralKey ¶
func (*Suite) GenClientSessionKey ¶
func (*Suite) GenClientSessionKeyProof ¶
func (*Suite) GenRandVal ¶
func (*Suite) GenServerEphemeralKey ¶
func (*Suite) GenServerSessionKey ¶
func (*Suite) GenServerSessionKeyProof ¶
func (*Suite) GenVerifier ¶
type VerifierReq ¶
Click to show internal directories.
Click to hide internal directories.