com.ajaxjs.util.cryptography.CryptographyImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ajaxjs-base Show documentation
Show all versions of ajaxjs-base Show documentation
AJAXJS aims to full-stack, not only the server-side framework,
but also integrates the front-end library. It's written in HTML5 + Java, a successor to the JVM platform, efficient, secure, stable, cross-platform and many other advantages, but it abandoned the traditional enterprise architecture brought about by the large and bloated,
emphasizing the lightweight, and fast, very suitable for the Internet fast application.
package com.ajaxjs.util.cryptography;
public class CryptographyImpl {
/**
* AES 加密
*
* @param str 要加密的内容
* @param key 密钥
* @return 加密后的内容
*/
public String AES_Encrypt(String str, String key) {
return SymmetricCipher.AES_Encrypt(str, key);
}
/**
* AES 解密
*
* @param str 要解密的内容
* @param key 密钥
* @return 加密后的内容
*/
public String AES_Decrypt(String str, String key) {
return SymmetricCipher.AES_Decrypt(str, key);
}
}