Documentation ¶
Index ¶
Constants ¶
View Source
const TURNKEY_API_SIGNATURE_SCHEME = "SIGNATURE_SCHEME_TK_API_P256"
Variables ¶
This section is empty.
Functions ¶
func DecodeTKPublicKey ¶
Takes a TK-encoded public key and creates an ECDSA public key
func EncodePrivateKey ¶
func EncodePrivateKey(privateKey *ecdsa.PrivateKey) string
Encode an ECDSA private key into the Turnkey format For now, "Turnkey format" = raw DER form
func EncodePublicKey ¶
Encode an ECDSA public key into the Turnkey format. For now, "Turnkey format" = standard compressed form for ECDSA keys
Types ¶
type ApiKey ¶
type ApiKey struct { TkPrivateKey string TkPublicKey string // contains filtered or unexported fields }
Struct to hold both serialized and ecdsa lib friendly version of a public/private key pair
func FromEcdsaPrivateKey ¶
func FromEcdsaPrivateKey(privateKey *ecdsa.PrivateKey) (*ApiKey, error)
Takes an ECDSA private key and create a new TkApiKey. Assumes that privateKey.PublicKey has been derived.
func FromTkPrivateKey ¶
Takes a TK-encoded private key and creates an ECDSA private key
Click to show internal directories.
Click to hide internal directories.