in.s8.rsa.util.Modulus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of RSA-Encryption-Decryption Show documentation
Show all versions of RSA-Encryption-Decryption Show documentation
Project to RSA-encrypt-decrypt
The newest version!
package in.s8.rsa.util;
import in.s8.rsa.constant.S8Constant;
import javax.crypto.Cipher;
import java.security.interfaces.RSAPublicKey;
/**
* Created by Sourabh_Sethi on 4/26/2016.
*/
public class Modulus{
public static String getModulus( RSAPublicKey rsaPK) {
String modulus = null;
try {
final Cipher cipher = Cipher.getInstance(S8Constant.ALGORITHM);
modulus = rsaPK.getModulus().toString(16);
} catch (Exception e) {
e.printStackTrace();
}
return modulus;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy