Top Description Fields Constructors Methods
org.h2.security

public Class AES

extends Object
implements BlockCipher
Class Inheritance
All Implemented Interfaces
org.h2.security.BlockCipher
Static Imports
org.h2.util.Bits.INT_VH_BE

An implementation of the AES block cipher algorithm, also known as Rijndael. Only AES-128 is supported by this class.

Field Summary

Modifier and TypeField and Description
private final int[]
private final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]
private static final int[]

Constructor Summary

AccessConstructor and Description
public
AES()

Method Summary

Modifier and TypeMethod and Description
public void
decrypt(byte[]
the byte array
bytes
,
int
the start index
off
,
int
the number of bytes to decrypt
len
)

Implements org.h2.security.BlockCipher.decrypt.

Decrypt a number of bytes.

private void
decryptBlock(byte[] in, byte[] out, int off)

public void
encrypt(byte[]
the byte array
bytes
,
int
the start index
off
,
int
the number of bytes to encrypt
len
)

Implements org.h2.security.BlockCipher.encrypt.

Encrypt a number of bytes.

private void
encryptBlock(byte[] in, byte[] out, int off)

private static int
getDec(int t)

public int
getKeyLength()

Implements org.h2.security.BlockCipher.getKeyLength.

Get the length of the key in bytes.

private static int
mul(int[] pow, int[] log, int x, int y)

private static int
rot8(int x)

public void
setKey(byte[]
the key
key
)

Implements org.h2.security.BlockCipher.setKey.

Set the encryption key used for encrypting and decrypting.

private static int
xtime(int x)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

decKeyback to summary
private final int[] decKey
encKeyback to summary
private final int[] encKey
FSback to summary
private static final int[] FS
FT0back to summary
private static final int[] FT0
FT1back to summary
private static final int[] FT1
FT2back to summary
private static final int[] FT2
FT3back to summary
private static final int[] FT3
RCONback to summary
private static final int[] RCON
RSback to summary
private static final int[] RS
RT0back to summary
private static final int[] RT0
RT1back to summary
private static final int[] RT1
RT2back to summary
private static final int[] RT2
RT3back to summary
private static final int[] RT3

Constructor Detail

AESback to summary
public AES()

Method Detail

decryptback to summary
public void decrypt(byte[] bytes, int off, int len)

Implements org.h2.security.BlockCipher.decrypt.

Doc from org.h2.security.BlockCipher.decrypt.

Decrypt a number of bytes. This is done in-place, that means the bytes are overwritten.

Parameters
bytes:byte[]

the byte array

off:int

the start index

len:int

the number of bytes to decrypt

Annotations
@Override
decryptBlockback to summary
private void decryptBlock(byte[] in, byte[] out, int off)
encryptback to summary
public void encrypt(byte[] bytes, int off, int len)

Implements org.h2.security.BlockCipher.encrypt.

Doc from org.h2.security.BlockCipher.encrypt.

Encrypt a number of bytes. This is done in-place, that means the bytes are overwritten.

Parameters
bytes:byte[]

the byte array

off:int

the start index

len:int

the number of bytes to encrypt

Annotations
@Override
encryptBlockback to summary
private void encryptBlock(byte[] in, byte[] out, int off)
getDecback to summary
private static int getDec(int t)
getKeyLengthback to summary
public int getKeyLength()

Implements org.h2.security.BlockCipher.getKeyLength.

Doc from org.h2.security.BlockCipher.getKeyLength.

Get the length of the key in bytes.

Returns:int

the length of the key

Annotations
@Override
mulback to summary
private static int mul(int[] pow, int[] log, int x, int y)
rot8back to summary
private static int rot8(int x)
setKeyback to summary
public void setKey(byte[] key)

Implements org.h2.security.BlockCipher.setKey.

Doc from org.h2.security.BlockCipher.setKey.

Set the encryption key used for encrypting and decrypting. The key needs to be 16 bytes long.

Parameters
key:byte[]

the key

Annotations
@Override
xtimeback to summary
private static int xtime(int x)