aes-256

command
v0.0.0-...-a2a1f02 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 4 Imported by: 0

README

aes-256 example

AES-256 No Mode can only encrypt/decrypt 16 bytes of data.

I have the following AES-256 mode examples,

GitHub Webpage

RUN

run aes.go

Your output should be,

Original Text:           Hello Jeff, only 16 Bytes of this will be encrypted.

The 32-byte Key:         myverystrongpasswordo32bitlength

Encrypted Text:          1d3288a55c1b74826395bd823d7cf0a2
Decrypted Text:          Hello Jeff, only

HOW IT WORKS

This example is simple and very limiting and has no mode. It will only encrypt 16 bytes of data.

Encryption,

// ENCRYPT DATA
block.Encrypt(cipherTextByte, plaintextByte)

Decryption,

// DeCRYPT DATA
block.Decrypt(plainTextByte, cipherTextByte)

This illustration may help,

IMAGE - aes - IMAGE

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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