Documentation ¶
Index ¶
- Variables
- func ArrayCompare(v1, v2 interface{}) error
- func CompareStringArray(v1, v2 []string) error
- func Debug(v ...interface{})
- func LiteralToBytes(v interface{}) ([]byte, bool)
- func LiteralToString(v interface{}) (string, bool)
- func LiteralToStringArray(v interface{}) []string
- func LiteralToTime(v interface{}) (time.Time, bool)
- func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)
- func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error)
- func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)
- func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)
- func SetDebug(flag bool)
- func SetOutput(s string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorNotSameType = errors.New("it is not the same type") ErrorNotSameSize = errors.New("it is not the same size") ErrorValidationFailed = errors.New("validation failed") )
View Source
var ( ErrorKeyMustBePEMEncoded = errors.New("key must be pem encoded") ErrorNotECPublicKey = errors.New("Key is not a valid ECDSA public key") ErrorNotECPrivateKey = errors.New("Key is not a valid ECDSA private key") ErrorNotRSAPrivateKey = errors.New("Key is not a valid RSA private key") ErrorNotRSAPublicKey = errors.New("Key is not a valid RSA public key") )
ECDSA parsing errors.
Functions ¶
func ArrayCompare ¶ added in v1.0.2
func ArrayCompare(v1, v2 interface{}) error
func CompareStringArray ¶ added in v1.0.2
func LiteralToBytes ¶
func LiteralToString ¶
func LiteralToStringArray ¶
func LiteralToStringArray(v interface{}) []string
func LiteralToTime ¶
func ParseECPrivateKeyFromPEM ¶
func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)
ParseECPrivateKeyFromPEM will parse a PEM encoded EC Private Key Structure.
func ParseECPublicKeyFromPEM ¶
ParseECPublicKeyFromPEM will parse a PEM encoded PKCS1 or PKCS8 public key
func ParseRSAPrivateKeyFromPEM ¶
func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)
Parse PEM encoded PKCS1 or PKCS8 private key
func ParseRSAPublicKeyFromPEM ¶
Parse PEM encoded PKCS1 or PKCS8 public key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.