public class CryptoUtil extends Object
Constructor and Description |
---|
CryptoUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decrypt(byte[] privateKey,
byte[] inputData) |
static byte[] |
encrypt(byte[] publicKey,
byte[] inputData) |
static byte[] |
encrypt2(PublicKey publicKey,
byte[] inputData) |
static KeyPair |
generateKeyPair() |
public static byte[] encrypt(byte[] publicKey, byte[] inputData) throws Exception
Exception
public static byte[] encrypt2(PublicKey publicKey, byte[] inputData) throws Exception
Exception
public static byte[] decrypt(byte[] privateKey, byte[] inputData) throws Exception
Exception
public static KeyPair generateKeyPair() throws NoSuchAlgorithmException, NoSuchProviderException
Copyright © 2016–2024. All rights reserved.