public class DHSession extends Object
| Constructor and Description |
|---|
DHSession()
Construct new Diffie-Hellman key exchange session
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(String cipherSpec,
String keySpec,
int blocksize,
byte[] encrypted) |
void |
finaliseKeyAgreement(String dhmessage) |
String |
getEncodedDHMaterial() |
public DHSession()
throws InvalidAlgorithmParameterException,
NoSuchAlgorithmException,
InvalidKeyException,
NoSuchProviderException
InvalidAlgorithmParameterException - Invalid DH parameters (primes)NoSuchAlgorithmException - DH algorithm not available in VMInvalidKeyException - Private key generated by DH generator invalidNoSuchProviderException - Bouncy castle provider does not existpublic String getEncodedDHMaterial()
public void finaliseKeyAgreement(String dhmessage) throws IOException, GeneralSecurityException, NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, IllegalStateException
public byte[] decrypt(String cipherSpec, String keySpec, int blocksize, byte[] encrypted) throws InvalidKeyException, IllegalStateException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, NoSuchProviderException
Copyright © 2013 dCache.org. All Rights Reserved.