public class DhUtil extends Object
| Constructor and Description |
|---|
DhUtil() |
| Modifier and Type | Method and Description |
|---|---|
static PublicKey |
convertEncodedBytesToPublicKey(byte[] encodedBytes) |
static KeyAgreement |
generateKeyAgreement(PrivateKey privateKey,
PublicKey publicKey) |
static Key |
generateSecretKey(PrivateKey privateKey,
PublicKey publicKey,
String algorithm) |
public static PublicKey convertEncodedBytesToPublicKey(byte[] encodedBytes) throws NoSuchAlgorithmException, InvalidKeySpecException
public static KeyAgreement generateKeyAgreement(PrivateKey privateKey, PublicKey publicKey) throws NoSuchAlgorithmException, InvalidKeyException
public static Key generateSecretKey(PrivateKey privateKey, PublicKey publicKey, String algorithm) throws InvalidKeyException, NoSuchAlgorithmException
Copyright © 2019. All rights reserved.