org.spongycastle.crypto.params.RSAPrivateCrtKeyParameters Java Examples
The following examples show how to use
org.spongycastle.crypto.params.RSAPrivateCrtKeyParameters.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Cryptograph.java From SightRemote with GNU General Public License v3.0 | 5 votes |
public static KeyPair generateRSAKey() { RSAKeyPairGenerator generator = new RSAKeyPairGenerator(); generator.init(new RSAKeyGenerationParameters(BigInteger.valueOf(65537), new SecureRandom(),2048, 8)); AsymmetricCipherKeyPair ackp = generator.generateKeyPair(); KeyPair keyPair = new KeyPair(); keyPair.privateKey = (RSAPrivateCrtKeyParameters) ackp.getPrivate(); keyPair.publicKey = (RSAKeyParameters) ackp.getPublic(); return keyPair; }
Example #2
Source File: Cryptograph.java From AndroidAPS with GNU Affero General Public License v3.0 | 5 votes |
public static KeyPair generateRSAKey() { RSAKeyPairGenerator generator = new RSAKeyPairGenerator(); generator.init(new RSAKeyGenerationParameters(BigInteger.valueOf(65537), new SecureRandom(), 2048, 8)); AsymmetricCipherKeyPair ackp = generator.generateKeyPair(); KeyPair keyPair = new KeyPair(); keyPair.privateKey = (RSAPrivateCrtKeyParameters) ackp.getPrivate(); keyPair.publicKey = (RSAKeyParameters) ackp.getPublic(); return keyPair; }
Example #3
Source File: Cryptograph.java From SightRemote with GNU General Public License v3.0 | 4 votes |
public static byte[] decryptRSA(RSAPrivateCrtKeyParameters key, byte[] data) throws InvalidCipherTextException { return processRSA(key, data, false); }
Example #4
Source File: Cryptograph.java From AndroidAPS with GNU Affero General Public License v3.0 | 4 votes |
public static byte[] decryptRSA(RSAPrivateCrtKeyParameters key, byte[] data) throws InvalidCipherTextException { return processRSA(key, data, false); }
Example #5
Source File: KeyPair.java From AndroidAPS with GNU Affero General Public License v3.0 | 4 votes |
public RSAPrivateCrtKeyParameters getPrivateKey() { return this.privateKey; }