core

package
v0.0.0-...-7b97167 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKeyStore

func CreateKeyStore(password string) string

CreateKeyStore function creates a keystore file

func GenerateMayus

func GenerateMayus() string

GenerateMayus generates one rand mayus char

func GenerateMin

func GenerateMin() string

GenerateMin generates one rand char

func GenerateNumber

func GenerateNumber() string

GenerateNumber the same method to generate one rand number as a char

func GeneratePassRand

func GeneratePassRand(long int, mayus bool, special bool, numbers bool) string

GeneratePassRand determines how the password must be done

func GeneratePublicAddress

func GeneratePublicAddress() (string, string, string)

GeneratePublicAddress generate the public address which is what you're used to seeing

func GenerateSpecial

func GenerateSpecial() string

GenerateSpecial generates one special character from the list

func ImportKeyStore

func ImportKeyStore(file []byte, password string) string

ImportKeyStore function to import jeystore file

func ProcessPassword

func ProcessPassword(count int, min Functions, mayus Functions, special Functions, numbers Functions) string

ProcessPassword makes the password base on the functions in the arguments

Types

type Functions

type Functions func() string

Functions type for the generate functions

type JWTAuthenticationBackend

type JWTAuthenticationBackend struct {
	PublicKey *rsa.PublicKey
	// contains filtered or unexported fields
}

JWTAuthenticationBackend struct to save keys

func InitJWTAuthenticationBackend

func InitJWTAuthenticationBackend() *JWTAuthenticationBackend

InitJWTAuthenticationBackend set keys if they aren't

func (*JWTAuthenticationBackend) GenerateToken

func (backend *JWTAuthenticationBackend) GenerateToken(userEmail string) (string, int64, error)

GenerateToken funtion generates one json token, argument is the user email, better change it to UUID?

Jump to

Keyboard shortcuts

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