aes.java
来自「ECLIPSE 3.3工程. AES算法的应用.」· Java 代码 · 共 50 行
JAVA
50 行
/**
* AES.java
*
* @author : 林足雄 LinZuxiong
* @date : 2009-3-22
*/
public class AES {
private String plaintext = "";// 明文
private String ciphertext = "";// 密文
private String key = null;
public AES() {
}
public AES(String plaintext, String ciphertext, String key) {
this.plaintext = plaintext;
this.ciphertext = ciphertext;
this.key = key;
}
// 加密
public String encrypt(String plaintext, String key) {
this.plaintext = plaintext;
this.key = key;
return "";
}
public String encrypt(String key) {
this.ciphertext = encrypt(plaintext, key);
return this.ciphertext;
}
public String getPlaintext() {
return plaintext;
}
public void setPlaintext(String plaintext) {
this.plaintext = plaintext;
}
public String getCiphertext() {
return ciphertext;
}
public void setCiphertext(String ciphertext) {
this.ciphertext = ciphertext;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?