提交 51dec17c authored 作者: Thomas Mueller's avatar Thomas Mueller

Reduce dependencies.

上级 a0f8ab3c
......@@ -6,9 +6,6 @@
*/
package org.h2.security;
import org.h2.constant.SysProperties;
import org.h2.message.DbException;
/**
* An implementation of the AES block cipher algorithm,
* also known as Rijndael. Only AES-128 is supported by this class.
......@@ -118,22 +115,12 @@ public class AES implements BlockCipher {
}
public void encrypt(byte[] bytes, int off, int len) {
if (SysProperties.CHECK) {
if (len % ALIGN != 0) {
DbException.throwInternalError("unaligned len " + len);
}
}
for (int i = off; i < off + len; i += 16) {
encryptBlock(bytes, bytes, i);
}
}
public void decrypt(byte[] bytes, int off, int len) {
if (SysProperties.CHECK) {
if (len % ALIGN != 0) {
DbException.throwInternalError("unaligned len " + len);
}
}
for (int i = off; i < off + len; i += 16) {
decryptBlock(bytes, bytes, i);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论