Documentation ¶
Index ¶
- Variables
- func CertificateFromBytes(bytes []byte) (*x509.Certificate, error)
- func CertificateFromFile(filename string) (*x509.Certificate, error)
- func HashPayload(message []byte) []byte
- func PrivateKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error)
- func PrivateKeyFromFile(filename string) (*ecdsa.PrivateKey, error)
- func PublicKeyFromCert(cert *x509.Certificate) (*ecdsa.PublicKey, error)
- func SignMessage(priv *ecdsa.PrivateKey, message []byte) (*big.Int, *big.Int, error)
- func VerifyMessage(pub *ecdsa.PublicKey, message []byte, r, s *big.Int) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthKeyNotPem = errors.New("AuthKey must be a valid .p8 PEM file") ErrAuthKeyNotECDSA = errors.New("AuthKey must be of type ecdsa.PrivateKey") ErrAuthKeyNil = errors.New("AuthKey was nil") )
.p8 errors file.
Functions ¶
func CertificateFromBytes ¶
func CertificateFromBytes(bytes []byte) (*x509.Certificate, error)
func CertificateFromFile ¶
func CertificateFromFile(filename string) (*x509.Certificate, error)
func HashPayload ¶
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error)
AuthKeyFromBytes loads a .p8 certificate from an in memory byte array and returns an *ecdsa.PrivateKey.
func PrivateKeyFromFile ¶
func PrivateKeyFromFile(filename string) (*ecdsa.PrivateKey, error)
func PublicKeyFromCert ¶
func PublicKeyFromCert(cert *x509.Certificate) (*ecdsa.PublicKey, error)
func SignMessage ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.