aes

package
v0.0.0-...-58ce9b1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package aes provides encryption for the vsafe app. These encryption routines do not support embedded null characters in strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(encoded string, key []byte) (string, error)

Decrypt decrypts encoded using key. encoded is a base64 encoded string from Encrypt.

func DecryptB

func DecryptB(encoded string, key []byte) ([]byte, error)

DecryptB decrypts encoded using key. encoded is a base64 encoded string from EncryptB. Decrypt returns a new slice.

func Encrypt

func Encrypt(plain string, key []byte) (string, error)

Encrypt encrypts plain with key and returns a base64 encoded string.

func EncryptB

func EncryptB(plain, key []byte) (string, error)

EncryptB encrypts plain with key and returns a base64 encoded string.

func PKCS7

func PKCS7(data *[]byte)

PKCS7 adds PKCS7 padding to data in place for AES encryption.

func UnPKCS7

func UnPKCS7(data *[]byte) error

UnPKCS7 removes PKCS7 padding for AES encryption from data in place and returns an error if data is not PKCS7 padded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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