gocrypt

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 6 Imported by: 0

README

Build Status Code Coverage

The most popular encrypt functions for Go (Golang) programming language

Installation

$ go get -u github.com/nordborn/gocrypt

or via go.mod:

github.com/nordborn/gocrypt v1.0.0

Usage

import (
    "fmt"
    "github.com/nordborn/gocrypt"
)

func main() {
    secret := "0IOP8VD6QM5OYM20XSM85IYOU8UHXP36J2RFSFO265J3"
    msg := "pair=ltcusd&nonce=152442791667649"
    signed := gocrypt.HMACSHA256HexDigest(secret, msg)
    // 92e05c5a3d6f2415412030c0ccae1e5e561a41c0aa75a9877b8bbf0cef49cb83
    fmt.Println(signed)
}

Provided functions

func HMACSHA256Base64Encoded(secret, msg string) string

func HMACSHA256HexDigest(secret, msg string) string

func HMACSHA512Base64Encoded(secret, msg string) string

func HMACSHA512HexDigest(secret, msg string) string

func SHA256Base64Encoded(msg string) string

func SHA256HexDigest(msg string) string

func SHA512Base64Encoded(msg string) string

func SHA512HexDigest(msg string) string

Documentation

Overview

Package gocrypt is a tiny wrapper that provides convenient access to the most used encrypting operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HMACSHA256Base64Encoded

func HMACSHA256Base64Encoded(secret, msg string) string

HMACSHA256Base64Encoded as a string

func HMACSHA256HexDigest

func HMACSHA256HexDigest(secret, msg string) string

HMACSHA256HexDigest as a string

func HMACSHA512Base64Encoded

func HMACSHA512Base64Encoded(secret, msg string) string

HMACSHA512Base64Encoded as a string

func HMACSHA512HexDigest

func HMACSHA512HexDigest(secret, msg string) string

HMACSHA512HexDigest as a string

func SHA256Base64Encoded

func SHA256Base64Encoded(msg string) string

SHA256Base64Encoded as a string

func SHA256HexDigest

func SHA256HexDigest(msg string) string

SHA256HexDigest as a string

func SHA512Base64Encoded

func SHA512Base64Encoded(msg string) string

SHA512Base64Encoded as a string

func SHA512HexDigest

func SHA512HexDigest(msg string) string

SHA512HexDigest as a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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