Top Description Fields Constructors Methods
org.h2.security

public Class Fog

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

A pseudo-encryption algorithm that makes the data appear to be encrypted. This algorithm is cryptographically extremely weak, and should only be used to hide data from reading the plain text using a text editor.

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
public
Fog()

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)

public int
getKeyLength()

Implements org.h2.security.BlockCipher.getKeyLength.

Get the length of the key in bytes.

public void
setKey(byte[]
the key
key
)

Implements org.h2.security.BlockCipher.setKey.

Set the encryption key used for encrypting and decrypting.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private int key

Constructor Detail

Fogback to summary
public Fog()

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)
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
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