|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjmathlib.core.interpreter.RootObject
jmathlib.core.functions.Function
jmathlib.core.functions.ExternalFunction
jmathlib.toolbox.crypto.aes
public class aes
An external function for computing a mesh of a matrix
| Field Summary | |
|---|---|
static int |
BLOCK_BITS
AES block size in bits (N.B. the Rijndael algorithm itself allows for other sizes). |
static int |
BLOCK_SIZE
AES block size in bytes (N.B. the Rijndael algorithm itself allows for other sizes). |
static int |
DIR_BOTH
|
static int |
DIR_DECRYPT
|
static int |
DIR_ENCRYPT
|
| Fields inherited from class jmathlib.core.functions.ExternalFunction |
|---|
IMAG, REAL |
| Fields inherited from class jmathlib.core.functions.Function |
|---|
lastModified, name, pathAndFileName |
| Fields inherited from interface jmathlib.core.constants.ErrorCodes |
|---|
ERR_BRACKET_OPEN, ERR_BRACKET_ORDER, ERR_FUNCTION_NOT_FOUND, ERR_FUNCTION_NOT_IMPLEMENTED, ERR_INSUFFICIENT_PARAMETERS, ERR_INVALID_PARAMETER, ERR_LVALUE_REQUIRED, ERR_MATRIX_SINGULAR, ERR_NOT_SQUARE_MATRIX, ERR_OPNOTSUPPORTED, ERR_TOO_MANY_PARAMETERS, ERR_USER_ERROR, ERR_VARIABLE_NOTDEFINED, OK, OK_FUNCTION_PROCESS |
| Fields inherited from interface jmathlib.core.constants.TokenConstants |
|---|
ADDSUB_PRIORITY, AND_PRIORITY, ANDAND_PRIORITY, ASSIGN_PRIORITY, BRACKET_PRIORITY, COMPARE_PRIORITY, CONCAT, MATRIX, MULDIV_PRIORITY, OR_PRIORITY, OROR_PRIORITY, PARAMETER, POWER_PRIORITY, RELATION_PRIORITY, SINGLE, ttDelimiter, ttNotSet, ttOperand, ttOperator |
| Constructor Summary | |
|---|---|
aes()
|
|
| Method Summary | |
|---|---|
int |
blockSize()
Block size in bytes |
void |
decrypt(byte[] ct,
byte[] pt)
Decrypt exactly one block (BLOCK_SIZE bytes) of ciphertext. |
void |
encrypt(byte[] pt,
byte[] ct)
Encrypt exactly one block (BLOCK_SIZE bytes) of plaintext. |
OperandToken |
evaluate(Token[] operands,
GlobalValues globals)
returns two matrices |
void |
finalize()
Destroy all sensitive information in this object. |
int |
keySize()
Block size in bytes |
void |
makeKey(byte[] cipherKey,
int keyBits)
Setup the AES key schedule (any cipher direction). |
void |
makeKey(byte[] cipherKey,
int keySize,
int direction)
Setup the AES key schedule for encryption, decryption, or both. |
| Methods inherited from class jmathlib.core.functions.ExternalFunction |
|---|
getParamCount |
| Methods inherited from class jmathlib.core.functions.Function |
|---|
debugLine, equals, getLastModified, getName, getNArgIn, getNArgOut, getNoOfLeftHandArguments, getPathAndFileName, setLastModified, setName, setNoOfLeftHandArguments, setPathAndFileName, throwMathLibException |
| Methods inherited from class jmathlib.core.interpreter.RootObject |
|---|
clone, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BLOCK_BITS
public static final int BLOCK_SIZE
public static final int DIR_DECRYPT
public static final int DIR_ENCRYPT
public static final int DIR_BOTH
| Constructor Detail |
|---|
public aes()
| Method Detail |
|---|
public OperandToken evaluate(Token[] operands,
GlobalValues globals)
evaluate in class Functionoperands[0] - = x values (e.g. [-2:0.2:2])operands[1] - = y values (e.g. [-2:0.2:2])operands[2] - = y values (e.g. [-2:0.2:2])
public final int blockSize()
public final int keySize()
public final void makeKey(byte[] cipherKey,
int keySize,
int direction)
throws java.lang.RuntimeException
cipherKey - the cipher key (128, 192, or 256 bits).keyBits - size of the cipher key in bits.direction - cipher direction (DIR_ENCRYPT, DIR_DECRYPT, or DIR_BOTH).
java.lang.RuntimeException
public final void makeKey(byte[] cipherKey,
int keyBits)
throws java.lang.RuntimeException
cipherKey - the cipher key (128, 192, or 256 bits).keyBits - size of the cipher key in bits.
java.lang.RuntimeException
public final void encrypt(byte[] pt,
byte[] ct)
pt - plaintext block.ct - ciphertext block.
public final void decrypt(byte[] ct,
byte[] pt)
ct - ciphertext block.pt - plaintext block.public final void finalize()
finalize in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||