cryptopasta

package
v0.0.0-...-2462c95 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cryptopasta represents the interface crypto implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

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

Codec predetermines the consistency of the interfaces crypto implementation.

func New

func New(key string) (*Crypto, error)

New is a Crypto constructor. Accepts a 256-bit key as a string encoded in standard base64.

func (*Crypto) Decrypt

func (c *Crypto) Decrypt(cipher []byte) (plain []byte, err error)

Decrypt - decrypted cipher to plain value.

func (*Crypto) Encrypt

func (c *Crypto) Encrypt(plain []byte) (cipher []byte, err error)

Encrypt - encrypted plain to cipher value.

Jump to

Keyboard shortcuts

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