key

package
v1.0.3012 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNamedCurve added in v1.0.2031

func AddNamedCurve(curve ecdh.Curve, oid asn1.ObjectIdentifier)

func MarshalPrivateKey

func MarshalPrivateKey(key *ecdh.PrivateKey) ([]byte, error)

包装私钥

func MarshalPublicKey

func MarshalPublicKey(key *ecdh.PublicKey) ([]byte, error)

包装公钥

func NamedCurveFromOid added in v1.0.2031

func NamedCurveFromOid(oid asn1.ObjectIdentifier) ecdh.Curve

func OidFromNamedCurve added in v1.0.2031

func OidFromNamedCurve(curve ecdh.Curve) (asn1.ObjectIdentifier, bool)

func ParsePrivateKey

func ParsePrivateKey(derBytes []byte) (*ecdh.PrivateKey, error)

解析私钥

func ParsePublicKey

func ParsePublicKey(derBytes []byte) (pub *ecdh.PublicKey, err error)

解析公钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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