public RSA() {
		super(ALGORITHM_RSA);
	}
@Test
	public void rsaTest() {
		final RSA rsa = new RSA();

		// 获取私钥和公钥
		assertNotNull(rsa.getPrivateKey());
		assertNotNull(rsa.getPrivateKeyBase64());
		assertNotNull(rsa.getPublicKey());
		assertNotNull(rsa.getPrivateKeyBase64());

		// 公钥加密，私钥解密
		final byte[] encrypt = rsa.encrypt(StrUtil.bytes("我是一段测试aaaa", CharsetUtil.CHARSET_UTF_8), KeyType.PublicKey);

		final byte[] decrypt = rsa.decrypt(encrypt, KeyType.PrivateKey);
		assertEquals("我是一段测试aaaa", StrUtil.str(decrypt, CharsetUtil.CHARSET_UTF_8));

		// 私钥加密，公钥解密
		final byte[] encrypt2 = rsa.encrypt(StrUtil.bytes("我是一段测试aaaa", CharsetUtil.CHARSET_UTF_8), KeyType.PrivateKey);
		final byte[] decrypt2 = rsa.decrypt(encrypt2, KeyType.PublicKey);
		assertEquals("我是一段测试aaaa", StrUtil.str(decrypt2, CharsetUtil.CHARSET_UTF_8));
	}