public class CryptUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.security.KeyFactory |
EC_KEYFACTORY |
static java.security.KeyFactory |
RSA_KEYFACTORY |
| Constructor and Description |
|---|
CryptUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.security.interfaces.ECPrivateKey |
ecPrivateKeyFromBase64(java.lang.String base64) |
static java.security.interfaces.ECPrivateKey |
ecPrivateKeyFromBytes(byte[] bytes) |
static java.security.interfaces.ECPublicKey |
ecPublicKeyFromBase64(java.lang.String base64) |
static java.security.interfaces.ECPublicKey |
ecPublicKeyFromBytes(byte[] bytes) |
static java.security.KeyPair |
generateEcdsa256KeyPair() |
static java.security.KeyPair |
generateEcdsa384KeyPair() |
static java.security.interfaces.RSAPrivateKey |
rsaPrivateKeyFromBase64(java.lang.String base64) |
static java.security.interfaces.RSAPrivateKey |
rsaPrivateKeyFromBytes(byte[] bytes) |
static java.security.interfaces.RSAPublicKey |
rsaPublicKeyFromBase64(java.lang.String base64) |
static java.security.interfaces.RSAPublicKey |
rsaPublicKeyFromBytes(byte[] bytes) |
static byte[] |
signSha256InP1363Format(java.security.interfaces.ECPrivateKey privateKey,
byte[] data) |
public static final java.security.KeyFactory RSA_KEYFACTORY
public static final java.security.KeyFactory EC_KEYFACTORY
public static java.security.interfaces.ECPublicKey ecPublicKeyFromBase64(java.lang.String base64)
public static java.security.interfaces.ECPrivateKey ecPrivateKeyFromBase64(java.lang.String base64)
public static java.security.interfaces.ECPublicKey ecPublicKeyFromBytes(byte[] bytes)
public static java.security.interfaces.ECPrivateKey ecPrivateKeyFromBytes(byte[] bytes)
public static java.security.interfaces.RSAPublicKey rsaPublicKeyFromBase64(java.lang.String base64)
public static java.security.interfaces.RSAPrivateKey rsaPrivateKeyFromBase64(java.lang.String base64)
public static java.security.interfaces.RSAPublicKey rsaPublicKeyFromBytes(byte[] bytes)
public static java.security.interfaces.RSAPrivateKey rsaPrivateKeyFromBytes(byte[] bytes)
public static java.security.KeyPair generateEcdsa256KeyPair()
public static java.security.KeyPair generateEcdsa384KeyPair()
public static byte[] signSha256InP1363Format(java.security.interfaces.ECPrivateKey privateKey,
byte[] data)
throws java.security.SignatureException,
java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException
java.security.SignatureExceptionjava.security.InvalidKeyExceptionjava.security.NoSuchAlgorithmException