crypto

package
v0.0.0-...-28b0f66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2017 License: MIT, Zlib Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTLSConfiguration

func CreateTLSConfiguration(caCertPath, certPath, keyPath string, skipTLSVerify bool) (*tls.Config, error)

CreateTLSConfiguration initializes a tls.Config using a CA certificate, a certificate and a key

Types

type Service

type Service struct{}

Service represents a service for encrypting/hashing data.

func (*Service) CompareHashAndData

func (*Service) CompareHashAndData(hash string, data string) error

CompareHashAndData compares a hash to clear data and returns an error if the comparison fails.

func (*Service) Hash

func (*Service) Hash(data string) (string, error)

Hash hashes a string using the bcrypt algorithm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL