From 24e263df5ccbab5f5a2c5468e0ae4d896c0c1b9b Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 27 May 2021 20:47:55 +0300 Subject: [PATCH] creds/s3: remove unused package Signed-off-by: Roman Khimov --- creds/s3/secret.go | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 creds/s3/secret.go diff --git a/creds/s3/secret.go b/creds/s3/secret.go deleted file mode 100644 index ffd74627..00000000 --- a/creds/s3/secret.go +++ /dev/null @@ -1,19 +0,0 @@ -package s3 - -import ( - "crypto/sha256" - "encoding/hex" - - "github.com/nspcc-dev/neofs-api-go/pkg/token" -) - -// SecretAccessKey returns secret access key generated by BearerToken. -func SecretAccessKey(tkn *token.BearerToken) (string, error) { - data, err := tkn.Marshal() - if err != nil { - return "", err - } - - hash := sha256.Sum256(data) - return hex.EncodeToString(hash[:]), nil -}