Documentation ¶
Index ¶
- type ECDSA
- func (e *ECDSA) FromPEM(privatePEM p.PrivatePEM, publicPEM p.PublicPEM) (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func (e *ECDSA) FromPEMPrivateKey(privatePEM p.PrivatePEM) (*ecdsa.PrivateKey, error)
- func (e *ECDSA) FromPEMPublicKey(publicPEM p.PublicPEM) (*ecdsa.PublicKey, error)
- func (e *ECDSA) P224() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func (e *ECDSA) P224PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
- func (e *ECDSA) P224PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
- func (e *ECDSA) P224PrivateKey() (*ecdsa.PrivateKey, error)
- func (e *ECDSA) P256() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func (e *ECDSA) P256PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
- func (e *ECDSA) P256PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
- func (e *ECDSA) P256PrivateKey() (*ecdsa.PrivateKey, error)
- func (e *ECDSA) P384() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func (e *ECDSA) P384PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
- func (e *ECDSA) P384PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
- func (e *ECDSA) P384PrivateKey() (*ecdsa.PrivateKey, error)
- func (e *ECDSA) P521() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func (e *ECDSA) P521PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
- func (e *ECDSA) P521PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
- func (e *ECDSA) P521PrivateKey() (*ecdsa.PrivateKey, error)
- func (e *ECDSA) ToJWK(publicKey *ecdsa.PublicKey, id string, algo jose.SignatureAlgorithm) ([]byte, error)
- func (e *ECDSA) ToJWKES256(publicKey *ecdsa.PublicKey, id string) ([]byte, error)
- func (e *ECDSA) ToJWKES384(publicKey *ecdsa.PublicKey, id string) ([]byte, error)
- func (e *ECDSA) ToJWKES512(publicKey *ecdsa.PublicKey, id string) ([]byte, error)
- func (e *ECDSA) ToPEM(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) (p.PrivatePEM, p.PublicPEM, error)
- func (e *ECDSA) ToPEMPrivateKey(privateKey *ecdsa.PrivateKey) (p.PrivatePEM, error)
- func (e *ECDSA) ToPEMPublicKey(publicKey *ecdsa.PublicKey) (p.PublicPEM, error)
- type IECDSA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECDSA ¶
type ECDSA struct{}
ECDSA struct to implement the IECDSA methods
func (*ECDSA) FromPEM ¶
func (e *ECDSA) FromPEM(privatePEM p.PrivatePEM, publicPEM p.PublicPEM) (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
FromPEM takes pem keys and converts them into a ecdsa keys
func (*ECDSA) FromPEMPrivateKey ¶
func (e *ECDSA) FromPEMPrivateKey(privatePEM p.PrivatePEM) (*ecdsa.PrivateKey, error)
FromPEMPrivateKey takes a private pem key and converts it into a ecdsa private key
func (*ECDSA) FromPEMPublicKey ¶
FromPEMPublicKey takes a public pem key and converts it into a ecdsa public key
func (*ECDSA) P224PEM ¶
func (e *ECDSA) P224PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
P224PEM generates new ECDSA P224 private/public pem keys
func (*ECDSA) P224PEMPrivateKey ¶
func (e *ECDSA) P224PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
P224PEMPrivateKey generates a new ECDSA P224 private PEM key
func (*ECDSA) P224PrivateKey ¶
func (e *ECDSA) P224PrivateKey() (*ecdsa.PrivateKey, error)
P224PrivateKey generates a new ECDSA P224 private key
func (*ECDSA) P256PEM ¶
func (e *ECDSA) P256PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
P256PEM generates new ECDSA P256 private/public pem keys
func (*ECDSA) P256PEMPrivateKey ¶
func (e *ECDSA) P256PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
P256PEMPrivateKey generates a new ECDSA P256 private PEM key
func (*ECDSA) P256PrivateKey ¶
func (e *ECDSA) P256PrivateKey() (*ecdsa.PrivateKey, error)
P256PrivateKey generates a new ECDSA P256 private key
func (*ECDSA) P384PEM ¶
func (e *ECDSA) P384PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
P384PEM generates new ECDSA P384 private/public pem keys
func (*ECDSA) P384PEMPrivateKey ¶
func (e *ECDSA) P384PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
P384PEMPrivateKey generates a new ECDSA P384 private PEM key
func (*ECDSA) P384PrivateKey ¶
func (e *ECDSA) P384PrivateKey() (*ecdsa.PrivateKey, error)
P384PrivateKey generates a new ECDSA P384 private key
func (*ECDSA) P521PEM ¶
func (e *ECDSA) P521PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error)
P521PEM generates new ECDSA P521 private/public pem keys
func (*ECDSA) P521PEMPrivateKey ¶
func (e *ECDSA) P521PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error)
P521PEMPrivateKey generates a new ECDSA P521 private PEM key
func (*ECDSA) P521PrivateKey ¶
func (e *ECDSA) P521PrivateKey() (*ecdsa.PrivateKey, error)
P521PrivateKey generates a new ECDSA P521 private key
func (*ECDSA) ToJWK ¶
func (e *ECDSA) ToJWK(publicKey *ecdsa.PublicKey, id string, algo jose.SignatureAlgorithm) ([]byte, error)
ToJWK converts ECDSA public key into a jwk
func (*ECDSA) ToJWKES256 ¶
ToJWKES256 converts ECDSA P256 public key into a jwk ES256
func (*ECDSA) ToJWKES384 ¶
ToJWKES384 converts ECDSA P384 public key into a jwk ES384
func (*ECDSA) ToJWKES512 ¶
ToJWKES512 converts ECDSA P521 public key into a jwk ES512
func (*ECDSA) ToPEM ¶
func (e *ECDSA) ToPEM(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) (p.PrivatePEM, p.PublicPEM, error)
ToPEM converts ECDSA private & public keys, into private & public PEM keys
func (*ECDSA) ToPEMPrivateKey ¶
func (e *ECDSA) ToPEMPrivateKey(privateKey *ecdsa.PrivateKey) (p.PrivatePEM, error)
ToPEMPrivateKey converts a ECDSA private key into a private PEM key
type IECDSA ¶
type IECDSA interface { P521() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) P384() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) P256() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) P224() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) P521PrivateKey() (*ecdsa.PrivateKey, error) P384PrivateKey() (*ecdsa.PrivateKey, error) P256PrivateKey() (*ecdsa.PrivateKey, error) P224PrivateKey() (*ecdsa.PrivateKey, error) P521PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error) P384PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error) P256PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error) P224PEM() (*ecdsa.PrivateKey, p.PrivatePEM, *ecdsa.PublicKey, p.PublicPEM, error) P521PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error) P384PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error) P256PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error) P224PEMPrivateKey() (*ecdsa.PrivateKey, p.PrivatePEM, error) FromPEMPrivateKey(p.PrivatePEM) (*ecdsa.PrivateKey, error) FromPEMPublicKey(p.PublicPEM) (*ecdsa.PublicKey, error) FromPEM(p.PrivatePEM, p.PublicPEM) (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) ToPEMPrivateKey(*ecdsa.PrivateKey) (p.PrivatePEM, error) ToPEMPublicKey(*ecdsa.PublicKey) (p.PublicPEM, error) ToPEM(*ecdsa.PrivateKey, *ecdsa.PublicKey) (p.PrivatePEM, p.PublicPEM, error) ToJWKES512(publicKey *ecdsa.PublicKey, id string) ([]byte, error) ToJWKES384(publicKey *ecdsa.PublicKey, id string) ([]byte, error) ToJWKES256(publicKey *ecdsa.PublicKey, id string) ([]byte, error) ToJWK(publicKey *ecdsa.PublicKey, id string, algo jose.SignatureAlgorithm) ([]byte, error) }
IECDSA interface for methods to generate ecdsa keys and conversion to PEM format