Java 8 RSAPublicKeySpec - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 RSAPublicKeySpec class.

This code example shows how to use the following methods: getModulus, getPublicExponent
import org.bouncycastle.asn1.ASN1Sequence; 
import org.bouncycastle.asn1.DERObjectIdentifier; 
import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers; 
import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers; 
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; 
import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; 
import org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure; 
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; 
import org.bouncycastle.asn1.x9.X9ObjectIdentifiers; 
// BEGIN android-removed 
// import org.bouncycastle.jce.interfaces.ElGamalPrivateKey; 
// import org.bouncycastle.jce.interfaces.ElGamalPublicKey; 
// import org.bouncycastle.jce.spec.ElGamalPrivateKeySpec; 
// import org.bouncycastle.jce.spec.ElGamalPublicKeySpec; 
// import org.bouncycastle.jce.spec.GOST3410PrivateKeySpec; 
// import org.bouncycastle.jce.spec.GOST3410PublicKeySpec; 
// END android-removed 
 
public abstract class JDKKeyFactory 
    extends KeyFactorySpi
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
This code example shows how to use the following methods: getModulus, getPublicExponent
 
   /** 
    * @return true if the keypairs match 
    */ 
   public static boolean privateKeyMatchesPublicKey(RSAPrivateCrtKeySpec privateKey, RSAPublicKeySpec publicKey) {
      return privateKey.getPublicExponent().equals(publicKey.getPublicExponent())
               && privateKey.getModulus().equals(publicKey.getModulus());
   } 
 
   /** 
    * @return true if the keypair has the same fingerprint as supplied 
    */ 
   public static boolean privateKeyHasFingerprint(RSAPrivateCrtKeySpec privateKey, String fingerprint) {
      return fingerprint(privateKey.getPublicExponent(), privateKey.getModulus()).equals(fingerprint);
   } 
 
   /** 
    * @param privateKeyPEM 
    *           RSA private key in PEM format 
    * @param fingerprint 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getModulus, getPublicExponent
    } 
 
    JCERSAPublicKey( 
        RSAPublicKeySpec spec)
    { 
        this.modulus = spec.getModulus();
        this.publicExponent = spec.getPublicExponent();
    } 
 
    JCERSAPublicKey( 
        RSAPublicKey key)
    { 
        this.modulus = key.getModulus();
        this.publicExponent = key.getPublicExponent();
    } 
 
    JCERSAPublicKey( 
        SubjectPublicKeyInfo    info)
    { 
        try 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getModulus, getPublicExponent

Related Java 8 RSAPublicKeySpec Questions & Answers: