aesdata

package
v0.0.0-...-ecdd364 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package aesdata provide encryption/decryption of JSON data using AES.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedStorage

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

EncryptedStorage represents a private key.

func NewEncryptedStorage

func NewEncryptedStorage(privatekey string) *EncryptedStorage

NewEncryptedStorage returns an encrypted storage object.

func (*EncryptedStorage) Decrypt

func (en *EncryptedStorage) Decrypt(enc []byte) ([]byte, error)

Decrypt data using private key or return empty JSON array.

func (*EncryptedStorage) Encrypt

func (en *EncryptedStorage) Encrypt(data []byte) ([]byte, error)

Encrypt data using private key.

Jump to

Keyboard shortcuts

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