cognito

package
v0.0.0-...-947a02f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package cognito contains the SRP primitives that differ between RFC 5054 and the AWS Cognito implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeU

func ComputeU(s *srp.SRP, xA, xB *big.Int) *big.Int

ComputeU calculates the SRP hash of both public A and B values according to the AWS Cognito implementation.

func ComputeX

func ComputeX(s *srp.SRP, identity, password, salt []byte) *big.Int

ComputeX calculates the SRP hash of the identity/username, password according to the AWS Cognito implementation.

func GetGroup

func GetGroup(n int) (*srp.Group, error)

GetGroup returns the AWS Cognito group for the prime of n bits.

func Multiplier

func Multiplier(s *srp.SRP) *big.Int

Multiplier calculates the SRP multiplier K according to the AWS Cognito implementation.

func NewSRP

func NewSRP() (*srp.SRP, error)

NewSRP returns a new srp.SRP struct with the Cognito-specific options already set.

func Pad

func Pad(b []byte) []byte

Pad prepends a zero byte to slice b if the first byte is greater than or equal to 0x80.

Types

This section is empty.

Jump to

Keyboard shortcuts

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