Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPrettyCurveName ¶
func GetPrettyCurveName(algo *asn1.ObjectIdentifier) string
GetPrettyCurveName for the provided object identifier
Types ¶
type CryptoKey ¶
type CryptoKey struct { Secret []byte PublicKey []byte Algorithm *asn1.ObjectIdentifier }
CryptoKey stores the fields needed to derive cryptocurrency specific sk, pk and pkh from a public key algorithm
func ParseAsn1EcKey ¶
func ParseAsn1EcKey(der []byte, setOid *asn1.ObjectIdentifier) (*CryptoKey, error)
ParseAsn1EcKey parses DER encoded bytes using the ASN.1 EC structure, returning public/secret key material. The object identifier must be manually set when EC object is PKCS8 encoded Compare to: x509.ParseECPrivateKey()
func ParseAsn1Pkcs8Key ¶
ParseAsn1Pkcs8Key parses DER encoded bytes using the ASN.1 PKCS8 structure and returns our public/secret keys material Compare to: x509.ParsePKCS8PrivateKey()
func ParseAsn1Pubkey ¶
ParseAsn1Pubkey parses DER encoded bytes using the ASN.1 Public Key structure and returns our public key material Compare to: x509.ParsePKIXPublicKey()