Documentation
¶
Index ¶
- Constants
- type Ed25519_KeyPair
- func (keypair *Ed25519_KeyPair) FromBase64(APIKEY string, privateKey_base64 string) error
- func (keypair *Ed25519_KeyPair) FromFiles(APIKEY string, privateKey_path string) error
- func (keypair *Ed25519_KeyPair) GetAPIKEY() string
- func (*Ed25519_KeyPair) GetType() int
- func (keypair *Ed25519_KeyPair) Sign(value string) (string, error)
- type HMAC_KeyPair
- type KeyPair
- type Nil_KeyPair
- type RSA_KeyPair
- func (keypair *RSA_KeyPair) FromBase64(APIKEY string, privateKey_base64 string) error
- func (keypair *RSA_KeyPair) FromFiles(APIKEY string, privateKey_path string) error
- func (keypair *RSA_KeyPair) GetAPIKEY() string
- func (keypair *RSA_KeyPair) GetType() int
- func (keypair *RSA_KeyPair) Sign(payload string) (string, error)
Constants ¶
View Source
const ( NIL_KEYPAIR_TYPE = iota HMAC_KEYPAIR_TYPE Ed25519_KEYPAIR_TYPE RSA_KEYPAIR_TYPE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ed25519_KeyPair ¶
type Ed25519_KeyPair struct {
// contains filtered or unexported fields
}
func (*Ed25519_KeyPair) FromBase64 ¶
func (keypair *Ed25519_KeyPair) FromBase64(APIKEY string, privateKey_base64 string) error
func (*Ed25519_KeyPair) FromFiles ¶
func (keypair *Ed25519_KeyPair) FromFiles(APIKEY string, privateKey_path string) error
func (*Ed25519_KeyPair) GetAPIKEY ¶
func (keypair *Ed25519_KeyPair) GetAPIKEY() string
func (*Ed25519_KeyPair) GetType ¶
func (*Ed25519_KeyPair) GetType() int
type HMAC_KeyPair ¶
type HMAC_KeyPair struct {
// contains filtered or unexported fields
}
func (*HMAC_KeyPair) FromString ¶
func (keypair *HMAC_KeyPair) FromString(APIKEY string, APISECRET string)
func (*HMAC_KeyPair) GetAPIKEY ¶
func (keypair *HMAC_KeyPair) GetAPIKEY() string
func (*HMAC_KeyPair) GetType ¶
func (*HMAC_KeyPair) GetType() int
type KeyPair ¶
type KeyPair interface {
// Returns which APIKEY type, unlikely to be used by the developer, only used by the library itself
GetType() int
// Returns the APIKEY for the keypair, "" is returned if the keypair is invalid or empty
GetAPIKEY() string
// Creates a signature with the provided APISECRET, returns "" if the keypair is invalid or empty
Sign(string) (string, error)
}
type Nil_KeyPair ¶
type Nil_KeyPair struct{}
func (*Nil_KeyPair) GetAPIKEY ¶
func (*Nil_KeyPair) GetAPIKEY() string
func (*Nil_KeyPair) GetType ¶
func (*Nil_KeyPair) GetType() int
type RSA_KeyPair ¶
type RSA_KeyPair struct {
// contains filtered or unexported fields
}
func (*RSA_KeyPair) FromBase64 ¶
func (keypair *RSA_KeyPair) FromBase64(APIKEY string, privateKey_base64 string) error
func (*RSA_KeyPair) FromFiles ¶
func (keypair *RSA_KeyPair) FromFiles(APIKEY string, privateKey_path string) error
func (*RSA_KeyPair) GetAPIKEY ¶
func (keypair *RSA_KeyPair) GetAPIKEY() string
func (*RSA_KeyPair) GetType ¶
func (keypair *RSA_KeyPair) GetType() int
Click to show internal directories.
Click to hide internal directories.