Documentation ¶
Index ¶
- type Authorizer
- type Erandom
- type HMACSHA
- type Oauth1
- func (oa *Oauth1) GetSignature(fullUrl string, method RequestMethod, hmacsha HMACSHA, token string) (string, error)
- func (oa *Oauth1) HmacEncrypt(value string, key string, algorithm HMACSHA) ([]byte, error)
- func (oa *Oauth1) RandomString(length int) string
- func (oa *Oauth1) ToBase64(data []byte) string
- type RequestMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Erandom ¶
Adapted from this code: https://nishanths.svbtle.com/do-not-seed-the-global-random
func (*Erandom) MakeRandom ¶
type Oauth1 ¶
type Oauth1 struct {
// contains filtered or unexported fields
}
func (*Oauth1) GetSignature ¶
func (*Oauth1) HmacEncrypt ¶
code adapted from this: https://golangcode.com/generate-sha256-hmac/
func (*Oauth1) RandomString ¶
Click to show internal directories.
Click to hide internal directories.