dsa

package
v1.0.2076 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// 默认为 pkcs1 模式
	MarshalPublicKey = MarshalPKCS1PublicKey
	ParsePublicKey   = ParsePKCS1PublicKey

	MarshalPrivateKey = MarshalPKCS1PrivateKey
	ParsePrivateKey   = ParsePKCS1PrivateKey
)

Functions

func MarshalPKCS1PrivateKey added in v1.0.2014

func MarshalPKCS1PrivateKey(key *dsa.PrivateKey) ([]byte, error)

包装私钥

func MarshalPKCS1PublicKey added in v1.0.2014

func MarshalPKCS1PublicKey(key *dsa.PublicKey) ([]byte, error)

包装公钥

func MarshalPKCS8PrivateKey added in v1.0.1022

func MarshalPKCS8PrivateKey(key *dsa.PrivateKey) ([]byte, error)

PKCS8 包装私钥

func MarshalPKCS8PublicKey added in v1.0.1022

func MarshalPKCS8PublicKey(pub *dsa.PublicKey) ([]byte, error)

PKCS8 包装公钥

func MarshalXMLPrivateKey added in v1.0.2015

func MarshalXMLPrivateKey(key *dsa.PrivateKey) ([]byte, error)

func MarshalXMLPublicKey added in v1.0.2015

func MarshalXMLPublicKey(key *dsa.PublicKey) ([]byte, error)

func ParsePKCS1PrivateKey added in v1.0.2014

func ParsePKCS1PrivateKey(derBytes []byte) (*dsa.PrivateKey, error)

解析私钥

func ParsePKCS1PublicKey added in v1.0.2014

func ParsePKCS1PublicKey(derBytes []byte) (*dsa.PublicKey, error)

解析公钥

func ParsePKCS8PrivateKey added in v1.0.1022

func ParsePKCS8PrivateKey(derBytes []byte) (key *dsa.PrivateKey, err error)

PKCS8 解析私钥

func ParsePKCS8PublicKey added in v1.0.1022

func ParsePKCS8PublicKey(derBytes []byte) (*dsa.PublicKey, error)

PKCS8 解析公钥

func ParseXMLPrivateKey added in v1.0.2015

func ParseXMLPrivateKey(der []byte) (*dsa.PrivateKey, error)

func ParseXMLPublicKey added in v1.0.2015

func ParseXMLPublicKey(der []byte) (*dsa.PublicKey, error)

Types

type PKCS1Key added in v1.0.1032

type PKCS1Key struct{}

*

  • dsa pkcs1 密钥 *
  • @create 2022-3-19
  • @author deatil

func NewPKCS1Key added in v1.0.1032

func NewPKCS1Key() PKCS1Key

构造函数

func (PKCS1Key) MarshalPrivateKey added in v1.0.1032

func (this PKCS1Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)

包装私钥

func (PKCS1Key) MarshalPublicKey added in v1.0.1032

func (this PKCS1Key) MarshalPublicKey(key *dsa.PublicKey) ([]byte, error)

包装公钥

func (PKCS1Key) ParsePrivateKey added in v1.0.1032

func (this PKCS1Key) ParsePrivateKey(derBytes []byte) (*dsa.PrivateKey, error)

解析私钥

func (PKCS1Key) ParsePublicKey added in v1.0.1032

func (this PKCS1Key) ParsePublicKey(derBytes []byte) (*dsa.PublicKey, error)

解析公钥

type PKCS8Key added in v1.0.1032

type PKCS8Key struct{}

*

  • dsa pkcs8 密钥 *
  • @create 2022-3-19
  • @author deatil

func NewPKCS8Key added in v1.0.1032

func NewPKCS8Key() PKCS8Key

构造函数

func (PKCS8Key) MarshalPrivateKey added in v1.0.2014

func (this PKCS8Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)

PKCS8 包装私钥

func (PKCS8Key) MarshalPublicKey added in v1.0.2014

func (this PKCS8Key) MarshalPublicKey(key *dsa.PublicKey) ([]byte, error)

PKCS8 包装公钥

func (PKCS8Key) ParsePrivateKey added in v1.0.2014

func (this PKCS8Key) ParsePrivateKey(der []byte) (key *dsa.PrivateKey, err error)

PKCS8 解析私钥

func (PKCS8Key) ParsePublicKey added in v1.0.2014

func (this PKCS8Key) ParsePublicKey(der []byte) (*dsa.PublicKey, error)

PKCS8 解析公钥

type XMLKey added in v1.0.2015

type XMLKey struct{}

*

  • dsa xml密钥 *
  • @create 2023-6-5
  • @author deatil

func NewXMLKey added in v1.0.2015

func NewXMLKey() XMLKey

构造函数

func (XMLKey) MarshalPrivateKey added in v1.0.2015

func (this XMLKey) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)

包装私钥

func (XMLKey) MarshalPublicKey added in v1.0.2015

func (this XMLKey) MarshalPublicKey(key *dsa.PublicKey) ([]byte, error)

包装公钥

func (XMLKey) ParsePrivateKey added in v1.0.2015

func (this XMLKey) ParsePrivateKey(data []byte) (*dsa.PrivateKey, error)

解析私钥

func (XMLKey) ParsePublicKey added in v1.0.2015

func (this XMLKey) ParsePublicKey(data []byte) (*dsa.PublicKey, error)

解析公钥

Jump to

Keyboard shortcuts

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