Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
github.com/marcsantiago/go-fingerprint
This is a simple interface, which wraps github.com/minio/highwayhash to allow fingerprinting for any object that implements the Stringer interface. This allows for server side finger printing of structs created by server request payloads.
import "github.com/marcsantiago/go-fingerprint"
fingerprint.go scanner.go stringer.go
func Identify(strObjects ...fmt.Stringer) (string, error)
Identify takes the string representation of objects and creates a hash in the form of a uuid if a seed is not provided a random 32 byte key is generated using a timestamp
func SetHashKeyWithSeed(s int64)
SetHashKeyWithSeed sets the seed and generates a new 32 key for the internal hash function
type Scanner struct {
// contains filtered or unexported fields
}
Scanner provides the ability to create a single hash.Hash that can be reused
func NewScanner() Scanner
NewScanner returns an instance of scanner with the hash initialized using the math/rand package
func (sc Scanner) Identify(strObjects ...fmt.Stringer) (string, error)
func (sc *Scanner) SetHashKeyWithSeed(s int64)
SetHashKeyWithSeed sets the seed and generates a new 32 key for the internal hash function note that this is not protected by a mutex for performance reasons
type Stringer string
Stringer is a type alias for the string primitive that allows normal strings to satisfy the fmt.Stringer interface
func (s Stringer) String() string
Generated by godoc2md
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.