storj/pkg/auth/signature.go

15 lines
362 B
Go
Raw Normal View History

2019-01-24 20:15:10 +00:00
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package auth
import (
2019-01-30 20:47:21 +00:00
"storj.io/storj/pkg/identity"
"storj.io/storj/pkg/pkcrypto"
)
// GenerateSignature creates signature from identity id
2019-01-30 20:47:21 +00:00
func GenerateSignature(data []byte, identity *identity.FullIdentity) ([]byte, error) {
return pkcrypto.HashAndSign(identity.Key, data)
}