encryption

package
v0.0.0-...-f53915b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package encryption contains all the ECB and CBC encryption routines

Index

Constants

This section is empty.

Variables

View Source
var BlockSize = aes.BlockSize

BlockSize Export this value (which is always 16 lol) to other packages so they don't need to import crypto/aes

Functions

func DecryptFile

func DecryptFile(data []byte, iv []byte, key []byte) []byte

DecryptFile This function uses the decrypted data encryption key and the retrieved IV from the S3 metadata to decrypt the data file

func ECBDecrypt

func ECBDecrypt(ciphertext []byte, key []byte) []byte

ECBDecrypt This function does the ECB decryption of the stored data encryption key with the KMS generated envelope key

func ECBEncrypt

func ECBEncrypt(plaintext []byte, key []byte) []byte

ECBEncrypt This function encrypts the data encryption key with the KMS generated envelope key

func EncryptFile

func EncryptFile(data []byte, key []byte) ([]byte, []byte)

EncryptFile This function uses the provided data encryption key and generates an IV to encrypt the data file

func GenerateDataKey

func GenerateDataKey() []byte

GenerateDataKey Does what's on the tin, generates the data encryption key

Types

This section is empty.

Jump to

Keyboard shortcuts

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