ed521

package
v1.1.1013 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemeED521   = ed521.ED521
	SchemeED521Ph = ed521.ED521Ph
)

Variables

View Source
var (
	// Get cipher from name
	GetCipherFromName = pkcs8.GetCipherFromName
	// Get hash from name
	GetHashFromName = pkcs8.GetHashFromName
)
View Source
var (
	ErrKeyMustBePEMEncoded = errors.New("go-cryptobin/ed521: invalid key: Key must be a PEM encoded PKCS8 key")
	ErrNotEdPrivateKey     = errors.New("go-cryptobin/ed521: key is not a valid ED521 private key")
	ErrNotEdPublicKey      = errors.New("go-cryptobin/ed521: key is not a valid ED521 public key")
)

Functions

This section is empty.

Types

type ED521

type ED521 struct {

	// error list
	Errors []error
	// contains filtered or unexported fields
}

*

  • ED521 *
  • @create 2025-12-2
  • @author deatil

func FromBase64String

func FromBase64String(data string) ED521

From Base64 String

func FromBytes

func FromBytes(data []byte) ED521

From Bytes

func FromHexString

func FromHexString(data string) ED521

From Hex String

func FromPrivateKey

func FromPrivateKey(key []byte) ED521

From PrivateKey bytes

func FromPrivateKeyDer added in v1.1.1013

func FromPrivateKeyDer(der []byte) ED521

From PrivateKey Der bytes

func FromPrivateKeySeed

func FromPrivateKeySeed(seed []byte) ED521

From PrivateKey Seed bytes

func FromPrivateKeyWithPassword

func FromPrivateKeyWithPassword(key []byte, password string) ED521

From PrivateKey bytes With Password

func FromPublicKey

func FromPublicKey(key []byte) ED521

From PublicKey bytes

func FromPublicKeyDer added in v1.1.1013

func FromPublicKeyDer(der []byte) ED521

From PublicKey Der bytes

func FromString

func FromString(data string) ED521

From String

func GenerateKey

func GenerateKey() ED521

GenerateKey

func GenerateKeyWithSeed

func GenerateKeyWithSeed(reader io.Reader) ED521

GenerateKey With Seed

func New

func New() ED521

NewED521

func NewED521

func NewED521() ED521

NewED521

func (ED521) AppendError

func (this ED521) AppendError(err ...error) ED521

append error

func (ED521) CheckKeyPair

func (this ED521) CheckKeyPair() bool

Check KeyPair

func (ED521) CreatePrivateKey

func (this ED521) CreatePrivateKey() ED521

生成私钥 pem 数据 Create PrivateKey PEM data

func (ED521) CreatePrivateKeyWithPassword

func (this ED521) CreatePrivateKeyWithPassword(password string, opts ...any) ED521

生成 PKCS8 私钥带密码 pem 数据 Create PrivateKey PEM data with password CreatePrivateKeyWithPassword("123", "AES256CBC", "SHA256")

func (ED521) CreatePublicKey

func (this ED521) CreatePublicKey() ED521

生成公钥 pem 数据 Create PublicKey PEM data

func (ED521) Error

func (this ED521) Error() error

return error

func (ED521) FromBase64String

func (this ED521) FromBase64String(data string) ED521

From Base64 String

func (ED521) FromBytes

func (this ED521) FromBytes(data []byte) ED521

From Bytes

func (ED521) FromHexString

func (this ED521) FromHexString(data string) ED521

From Hex String

func (ED521) FromPrivateKey

func (this ED521) FromPrivateKey(key []byte) ED521

From PrivateKey bytes

func (ED521) FromPrivateKeyDer

func (this ED521) FromPrivateKeyDer(der []byte) ED521

From PrivateKey Der bytes

func (ED521) FromPrivateKeySeed

func (this ED521) FromPrivateKeySeed(seed []byte) ED521

From PrivateKey Seed bytes

func (ED521) FromPrivateKeyString

func (this ED521) FromPrivateKeyString(keyString string) ED521

PrivateKey hex string private-key: 07e4********;

func (ED521) FromPrivateKeyWithPassword

func (this ED521) FromPrivateKeyWithPassword(key []byte, password string) ED521

From PrivateKey bytes With Password

func (ED521) FromPublicKey

func (this ED521) FromPublicKey(key []byte) ED521

From PublicKey bytes

func (ED521) FromPublicKeyDer

func (this ED521) FromPublicKeyDer(der []byte) ED521

From PublicKey Der bytes

func (ED521) FromPublicKeyString

func (this ED521) FromPublicKeyString(keyString string) ED521

PublicKey hex string

func (ED521) FromString

func (this ED521) FromString(data string) ED521

From String

func (ED521) GenerateKey

func (this ED521) GenerateKey() ED521

GenerateKey

func (ED521) GenerateKeyWithSeed

func (this ED521) GenerateKeyWithSeed(reader io.Reader) ED521

GenerateKey With Seed

func (ED521) GetData

func (this ED521) GetData() []byte

Get data

func (ED521) GetErrors

func (this ED521) GetErrors() []error

Get Error list

func (ED521) GetKeyData

func (this ED521) GetKeyData() []byte

Get keyData

func (ED521) GetOptions

func (this ED521) GetOptions() *Options

Get Options

func (ED521) GetParsedData

func (this ED521) GetParsedData() []byte

Get parsedData

func (ED521) GetPrivateKey

func (this ED521) GetPrivateKey() *ed521.PrivateKey

Get PrivateKey

func (ED521) GetPrivateKeySeed

func (this ED521) GetPrivateKeySeed() []byte

Get PrivateKeySeed

func (ED521) GetPrivateKeySeedString

func (this ED521) GetPrivateKeySeedString() string

Get PrivateKeySeed

func (ED521) GetPrivateKeyString

func (this ED521) GetPrivateKeyString() string

get PrivateKey data hex string

func (ED521) GetPublicKey

func (this ED521) GetPublicKey() *ed521.PublicKey

Get PublicKey

func (ED521) GetPublicKeyString

func (this ED521) GetPublicKeyString() string

get PublicKey data hex string

func (ED521) GetVerify

func (this ED521) GetVerify() bool

Get verify

func (ED521) MakeKeyDer

func (this ED521) MakeKeyDer() ED521

Make Key Der data

func (ED521) MakePublicKey

func (this ED521) MakePublicKey() ED521

Make PublicKey

func (ED521) OnError

func (this ED521) OnError(fn func([]error)) ED521

func (ED521) ParsePrivateKeyFromPEM

func (this ED521) ParsePrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error)

Parse PrivateKey From PEM

func (ED521) ParsePrivateKeyFromPEMWithPassword

func (this ED521) ParsePrivateKeyFromPEMWithPassword(key []byte, password string) (crypto.PrivateKey, error)

Parse PrivateKey From PEM With Password

func (ED521) ParsePublicKeyFromPEM

func (this ED521) ParsePublicKeyFromPEM(key []byte) (crypto.PublicKey, error)

Parse PublicKey From PEM

func (ED521) SetOptions

func (this ED521) SetOptions(name string, context ...string) ED521

With options can use types [ED521Ph | ED521]

func (ED521) Sign

func (this ED521) Sign() ED521

privateKey Sign

func (ED521) ToBase64String

func (this ED521) ToBase64String() string

output base64 data

func (ED521) ToBytes

func (this ED521) ToBytes() []byte

output bytes data

func (ED521) ToHexString

func (this ED521) ToHexString() string

output hex data

func (ED521) ToKeyBytes

func (this ED521) ToKeyBytes() []byte

output key bytes data

func (ED521) ToKeyString

func (this ED521) ToKeyString() string

output key string data

func (ED521) ToString

func (this ED521) ToString() string

output string data

func (ED521) ToVerify

func (this ED521) ToVerify() bool

output verify data

func (ED521) ToVerifyInt

func (this ED521) ToVerifyInt() int

output verify int data

func (ED521) Verify

func (this ED521) Verify(data []byte) ED521

publicKey Verify

func (ED521) WithData

func (this ED521) WithData(data []byte) ED521

With data

func (ED521) WithErrors

func (this ED521) WithErrors(errs []error) ED521

With error list

func (ED521) WithOptions

func (this ED521) WithOptions(op *Options) ED521

With options

func (ED521) WithParsedData

func (this ED521) WithParsedData(data []byte) ED521

With parsedData

func (ED521) WithPrivateKey

func (this ED521) WithPrivateKey(data *ed521.PrivateKey) ED521

With PrivateKey

func (ED521) WithPublicKey

func (this ED521) WithPublicKey(data *ed521.PublicKey) ED521

With PublicKey

func (ED521) WithVerify

func (this ED521) WithVerify(data bool) ED521

With verify

type Options

type Options = ed521.Options

type Opts

type Opts = pkcs8.Opts

Options

type PBKDF2Opts

type PBKDF2Opts = pkcs8.PBKDF2Opts

PBKDF2 Options

type ScryptOpts

type ScryptOpts = pkcs8.ScryptOpts

Scrypt Options

Jump to

Keyboard shortcuts

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