2024年4月16日发(作者:)
Java Web项目怎么加下License
Java Web项目如何加上License
这个有成熟的开源产品吗 有做过的吗 求助
------最佳解决方案--------------------------------------------------------
public abstract class MyRSACoder {
public static final String KEY_ALGORITHM = RSA ;
public static final String KEY_PROVIDER = BC ;
public static final String SIGNATURE_ALGORITHM = SHA1WithRSA ;
/**
* 初始化密钥对
*/
public static Map String, Object initKeys(String seed) throws Exception {
Map String, Object keyMap = new HashMap String, Object ();
vider(new BouncyCastleProvider());
KeyPairGenerator keyPairGenerator =
tance(KEY_ALGORITHM,KEY_PROVIDER);
lize(1024,new SecureRandom(es()));
KeyPair pair = teKeyPair();
RSAPublicKey rsaPublicKey = (RSAPublicKey) lic();
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) vate();
KeyFactory factory =
tance(KEY_ALGORITHM,KEY_PROVIDER);
RSAPublicKeySpec pubKeySpec = new RSAPublicKeySpec(new
BigInteger(ulus().toString()),new
BigInteger(licExponent().toString()));
发布评论