Main
Home
Quick tour
Handbook
Docs
Mailing Lists
Demonstration
Download
Sourceforge project
FAQ
Links


Toolboxes
Char
Control
Crypto
Deprecated
Engine
Finance
FunFun
General
Graphics 3D
Graphics
Image
Integration
InputOutput
JMathLib
LinearAlgebra
Matrix
Miscellaneous
Net
Polynomial
Set
Signal
SpecFun
SpecialMatrix
Statistics
String
System
Time
Trigonometric
UserInterface
...


Contact
Developers

JMathLib
A Java Clone of Octave, SciLab, Freemat and Matlab.

[Index] [Documentation] [Demonstration] [Download]

Chapter 23. crypto

Table of Contents

aes

aes

Type: External

Group: Crypto

Syntax

answer = AES ("encrypt", plain, key) 
answer = AES ("e",       plain, key) 
answer = AES ("decrypt", cipher, key) 
answer = AES ("d",       cipher, key) 

Description

does encryption and descrption using the AES (advanced encryption standard) algorithm

Examples

> k=str2num("0987098709870987")  
k=[48,57,56,55,48,57,56,55,48,57,56,55,48,57,56,55] 

> a=str2num("asdfasdfasdfasdf") 
a=[97,115,100,102,97,115,100,102,97,115,100,102,97,115,100,102] 

> b=aes("e",a,k) 
b=[-103,34,84,18,-46,-58,35,89,80,17,81,118,-4,-15,-93,-31] 

> c=aes("d",b,k) 
c=[97,115,100,102,97,115,100,102,97,115,100,102,97,115,100,102] 

> num2str(c) 
 ans = asdfasdfasdfasdf 

Last modified
sourceforge