Documentation ¶
Index ¶
- Variables
- func CheckPublicKeyPEMFormat(certStringOrBytes interface{}) error
- func EnsurePublicKeyPEMFormat(certStringOrBytes interface{}) []byte
- func IsPublicKeyPEMFormat(certStringOrBytes interface{}) bool
- func ParseRSAPublicKeyFromPEM(pem []byte) (*rsa.PublicKey, error)
- func TrimPublicKey(cert string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEnclosed = fmt.Errorf("public key must be enclosed in %s %s", beginPublicKeyPrefix, endPublicKeySuffix)
)
Functions ¶
func CheckPublicKeyPEMFormat ¶
func CheckPublicKeyPEMFormat(certStringOrBytes interface{}) error
CheckPublicKeyPEMFormat checks whether PEM format has any errors (properly formatted)
func EnsurePublicKeyPEMFormat ¶
func EnsurePublicKeyPEMFormat(certStringOrBytes interface{}) []byte
EnsurePublicKeyPEMFormat ensures PK is wrapped into -----BEGIN PK ----- and -----END PK-----
func IsPublicKeyPEMFormat ¶
func IsPublicKeyPEMFormat(certStringOrBytes interface{}) bool
IsPublicKeyPEMFormat checks whether data has correct PEM format This function is a convenience wrapper for CheckPublicKeyPEMFormat
func ParseRSAPublicKeyFromPEM ¶
ParseRSAPublicKeyFromPEM parses PEM public key into struct
func TrimPublicKey ¶
TrimPublicKey trims PEM prefix/suffix from Public Key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.