diff options
Diffstat (limited to 'http-client/client.go')
| -rw-r--r-- | http-client/client.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/http-client/client.go b/http-client/client.go index 13baf20..346a654 100644 --- a/http-client/client.go +++ b/http-client/client.go @@ -3,8 +3,6 @@ package main import ( "bytes" "crypto/rsa" - "crypto/sha256" - "encoding/base64" "encoding/json" "errors" "fmt" @@ -24,8 +22,6 @@ const ( TryAuth = "tryAuth" ) -const TimestampFormat = "2006-01-02T15-01-05.999" - var storage struct { sync.RWMutex messages []Message @@ -52,13 +48,6 @@ func (msg *Message) toString() string { return fmt.Sprintf("%s: %s", msg.User, msg.Data) } -func signData(data []byte) string { - data64 := base64.StdEncoding.EncodeToString(data) - h := sha256.Sum256([]byte(data64)) - signature := fmt.Sprintf("%x", h) - return fmt.Sprintf("%s.%s", data64, signature) -} - func makeRequest(request Request, apiMethod string, key *rsa.PublicKey) (*http.Response, error) { signedRequest, err := signRequest(request, key) if err != nil { |