crypto

package
Version: v2.0.0-beta-001+incomp... Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key, ciphertext []byte) (plaintext []byte, err error)

Decrypt - Decrypt a token based on an encryption key The approach used here is based on the following direction on how to AES encrypt/decrypt our secret information, in this case tokens (normal, refresh and OAuth tokens). Source: https://github.com/giorgisio/examples/blob/master/aes-encrypt/main.go

func DecryptToken

func DecryptToken(key, t []byte) (string, error)

DecryptToken - Decrypt a token

func Encrypt

func Encrypt(key, text []byte) (ciphertext []byte, err error)

Encrypt - Encrypt a token based on an encryption key The approach used here is based on the following direction on how to AES encrypt/decrypt our secret information, in this case tokens (normal, refresh and OAuth tokens). Source: https://github.com/giorgisio/examples/blob/master/aes-encrypt/main.go

func EncryptToken

func EncryptToken(key []byte, t string) ([]byte, error)

EncryptToken - Encrypt a token being

func ReadEncryptionKey

func ReadEncryptionKey(v, f string) ([]byte, error)

ReadEncryptionKey - Read the encryption key from the shared volume

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL