dsa

package
v1.0.5011 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// pkcs1 default
	MarshalPublicKey = MarshalPKCS1PublicKey
	ParsePublicKey   = ParsePKCS1PublicKey

	MarshalPrivateKey = MarshalPKCS1PrivateKey
	ParsePrivateKey   = ParsePKCS1PrivateKey
)

Functions

func MarshalPKCS1PrivateKey

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

Marshal PKCS1 PrivateKey

func MarshalPKCS1PublicKey

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

Marshal PKCS1 PublicKey

func MarshalPKCS8PrivateKey

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

Marshal PrivateKey to der

func MarshalPKCS8PublicKey

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

Marshal PublicKey to der

func MarshalXMLPrivateKey

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

Marshal XML PrivateKey

func MarshalXMLPublicKey

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

Marshal XML PublicKey

func ParsePKCS1PrivateKey

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

Parse PKCS1 PrivateKey

func ParsePKCS1PublicKey

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

Parse PKCS1 PublicKey

func ParsePKCS8PrivateKey

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

Parse PrivateKey der

func ParsePKCS8PublicKey

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

Parse PublicKey der

func ParseXMLPrivateKey

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

Parse XML PrivateKey

func ParseXMLPublicKey

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

Parse XML PublicKey

Types

type PKCS1Key

type PKCS1Key struct{}

*

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

func NewPKCS1Key

func NewPKCS1Key() PKCS1Key

NewPKCS1Key

func (PKCS1Key) MarshalPrivateKey

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

Marshal PKCS1 PrivateKey

func (PKCS1Key) MarshalPublicKey

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

Marshal PKCS1 PublicKey

func (PKCS1Key) ParsePrivateKey

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

Parse PKCS1 PrivateKey

func (PKCS1Key) ParsePublicKey

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

Parse PKCS1 PublicKey

type PKCS8Key

type PKCS8Key struct{}

*

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

func NewPKCS8Key

func NewPKCS8Key() PKCS8Key

NewPKCS8Key

func (PKCS8Key) MarshalPrivateKey

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

Marshal PrivateKey to der

func (PKCS8Key) MarshalPublicKey

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

Marshal PublicKey to der

func (PKCS8Key) ParsePrivateKey

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

Parse PrivateKey der

func (PKCS8Key) ParsePublicKey

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

Parse PublicKey der

type XMLKey

type XMLKey struct{}

*

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

func NewXMLKey

func NewXMLKey() XMLKey

NewXMLKey

func (XMLKey) MarshalPrivateKey

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

Marshal XML PrivateKey

func (XMLKey) MarshalPublicKey

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

Marshal XML PublicKey

func (XMLKey) ParsePrivateKey

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

Parse XML PrivateKey

func (XMLKey) ParsePublicKey

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

Parse XML PublicKey

Jump to

Keyboard shortcuts

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