org.spongycastle.crypto.params.AsymmetricKeyParameter Java Examples
The following examples show how to use
org.spongycastle.crypto.params.AsymmetricKeyParameter.
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: ECIESPublicKeyEncoder.java From wkcwallet-java with Apache License 2.0 | 4 votes |
@Override public byte[] getEncoded(AsymmetricKeyParameter asymmetricKeyParameter) { return ((ECPublicKeyParameters) asymmetricKeyParameter).getQ().getEncoded(false); }
Example #2
Source File: Cryptograph.java From SightRemote with GNU General Public License v3.0 | 4 votes |
private static byte[] processRSA(AsymmetricKeyParameter key, byte[] data, boolean encrypt) throws InvalidCipherTextException { OAEPEncoding cipher = new OAEPEncoding(new RSAEngine()); cipher.init(encrypt, key); return cipher.processBlock(data, 0, data.length); }
Example #3
Source File: ECIESPublicKeyEncoder.java From asf-sdk with GNU General Public License v3.0 | 4 votes |
@Override public byte[] getEncoded(AsymmetricKeyParameter asymmetricKeyParameter) { return ((ECPublicKeyParameters) asymmetricKeyParameter).getQ() .getEncoded(false); }
Example #4
Source File: Cryptograph.java From AndroidAPS with GNU Affero General Public License v3.0 | 4 votes |
private static byte[] processRSA(AsymmetricKeyParameter key, byte[] data, boolean encrypt) throws InvalidCipherTextException { OAEPEncoding cipher = new OAEPEncoding(new RSAEngine()); cipher.init(encrypt, key); return cipher.processBlock(data, 0, data.length); }