aes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package aes contains an implentation of CryptoService interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AES

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

AES is an implementation of Advanced Encryption Standart also known as Rjindael.

func (AES) Decrypt

func (a AES) Decrypt(data []byte) ([]byte, error)

Decrypt decrypts encrypted data using AES with CTR block mode. Encrypted data should be presented as byte array. Decrypted data is presented as byte array. If aes.NewCipher occurs any error, this will be returned.

func (AES) Encrypt

func (a AES) Encrypt(data []byte) ([]byte, error)

Encrypt encrypts data using AES with CTR block mode. Data should be presented as byte array. Encrypted data is presented as byte array. If aes.NewCipher occurs any error, this will be returned.

func (*AES) SetIV

func (a *AES) SetIV(IV []byte)

SetIV sets IV for AES instance. IV should be presented as byte array.

func (*AES) SetKey

func (a *AES) SetKey(key []byte)

SetKey sets secret key for AES instance. Key should be presented as byte array.

Jump to

Keyboard shortcuts

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