Documentation ¶
Index ¶
- Variables
- type ES
- func (e *ES) Curve() EllipticCurve
- func (e *ES) D() *big.Int
- func (e *ES) Hash() hash.Hash
- func (e *ES) PrivateKey() *PrivateKey
- func (e *ES) PublicKey() *PublicKey
- func (e *ES) Sign(data []byte) []byte
- func (e *ES) Verify(data []byte, signature []byte) bool
- func (e *ES) X() *big.Int
- func (e *ES) Y() *big.Int
- type EllipticCurve
- type PEM
- type Private
- type PrivateKey
- type Public
- type PublicKey
- type RS256
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AlgES256 = "ES256" AlgHS256 = "HS256" AlgRS256 = "RS256" )
Functions ¶
This section is empty.
Types ¶
type ES ¶
type ES struct { Private *PrivateKey HashId crypto.Hash }
func NewES ¶
func NewES(curve EllipticCurve) *ES
func (*ES) Curve ¶
func (e *ES) Curve() EllipticCurve
func (*ES) PrivateKey ¶
func (e *ES) PrivateKey() *PrivateKey
type EllipticCurve ¶
func P256 ¶
func P256() EllipticCurve
func P384 ¶
func P384() EllipticCurve
func P521 ¶
func P521() EllipticCurve
func Prime256v1 ¶
func Prime256v1() EllipticCurve
func Secp256r1 ¶
func Secp256r1() EllipticCurve
func Secp384r1 ¶
func Secp384r1() EllipticCurve
func Secp521r1 ¶
func Secp521r1() EllipticCurve
type PrivateKey ¶
type PrivateKey ecdsa.PrivateKey
func (*PrivateKey) Bytes ¶
func (k *PrivateKey) Bytes() []byte
func (*PrivateKey) Key ¶
func (k *PrivateKey) Key() *ecdsa.PrivateKey
func (*PrivateKey) PEM ¶
func (k *PrivateKey) PEM() string
func (*PrivateKey) PrivateKeyHex ¶
func (k *PrivateKey) PrivateKeyHex() string
func (*PrivateKey) Public ¶
func (k *PrivateKey) Public() *PublicKey
type PublicKey ¶
func UnmarshalECPublicKey ¶
func UnmarshalECPublicKey(curve EllipticCurve, bs []byte) *PublicKey
func (*PublicKey) CompressedBytes ¶
type RS256 ¶
type RS256 struct { PrivateKey *rsa.PrivateKey PublicKey *rsa.PublicKey }
func (*RS256) PEMPassphrasePrivateKey ¶
func (*RS256) PEMPrivateKey ¶
func (*RS256) PEMPublicKey ¶
Click to show internal directories.
Click to hide internal directories.