Documentation
¶
Index ¶
- func GeneratePresignedToken(secretKey, method, bucket, key string, expiresAt time.Time) string
- func GenerateSignature(secretKey, method, path, timestamp string) string
- func HashSecret(secret string) string
- func IsTimestampValid(timestamp string) bool
- func VerifyPresignedToken(secretKey, method, bucket, key string, expiresAt time.Time, token string) bool
- func VerifySecret(secret, hash string) bool
- func VerifySignature(secretKey, method, path, timestamp, signature string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePresignedToken ¶
GeneratePresignedToken creates a token for presigned URLs
func GenerateSignature ¶
GenerateSignature creates an HMAC-SHA256 signature for a request
func HashSecret ¶
HashSecret creates a SHA-256 hash of a secret key for storage
func IsTimestampValid ¶
IsTimestampValid checks if a timestamp is within acceptable range (15 minutes)
func VerifyPresignedToken ¶
func VerifyPresignedToken(secretKey, method, bucket, key string, expiresAt time.Time, token string) bool
VerifyPresignedToken verifies a presigned URL token
func VerifySecret ¶
VerifySecret checks if a secret matches a stored hash
func VerifySignature ¶
VerifySignature verifies an HMAC-SHA256 signature
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.