config

package
v0.0.0-...-beacba6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig() *Config

func (*Config) AESBytesLength

func (c *Config) AESBytesLength() int

func (*Config) EllipticCurve

func (c *Config) EllipticCurve() elliptic.Curve

func (*Config) HashFunc

func (c *Config) HashFunc() func() hash.Hash

func (*Config) SetSecurityLevel

func (c *Config) SetSecurityLevel(securityLevel int, hashFamily string) error

SetSecurityLevel 设置哈希函数的安全级别,securityLevel 可取的值包括 256 和 384,hashFamily 可取的值 包括 SHA2 和 SHA3。

SHA2
	256:sha256.New,elliptic.P256()
	384:sha512.New384,elliptic.P384()

SHA3
	256:sha3.New256,elliptic.P256()
	384:sha3.New384,elliptic.P384()

Jump to

Keyboard shortcuts

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