You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

github.com/marcsantiago/go-fingerprint

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/marcsantiago/go-fingerprint


Version published

Readme

Source

go-fingerprint Go

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.

fingerprint

import "github.com/marcsantiago/go-fingerprint"

  • Overview
  • Index

Overview

Index

Package files

fingerprint.go scanner.go stringer.go

func Identify

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

func SetHashKeyWithSeed(s int64)

SetHashKeyWithSeed sets the seed and generates a new 32 key for the internal hash function

type Scanner

type Scanner struct {
    // contains filtered or unexported fields
}

Scanner provides the ability to create a single hash.Hash that can be reused

func NewScanner

func NewScanner() Scanner

NewScanner returns an instance of scanner with the hash initialized using the math/rand package

func (Scanner) Identify

func (sc Scanner) Identify(strObjects ...fmt.Stringer) (string, error)

func (*Scanner) SetHashKeyWithSeed

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

type Stringer string

Stringer is a type alias for the string primitive that allows normal strings to satisfy the fmt.Stringer interface

func (Stringer) String

func (s Stringer) String() string

Generated by godoc2md

FAQs

Package last updated on 10 Jun 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc