public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
base64Decode(java.lang.String base64Encoded)
Base64-decode a string.
|
static java.security.PrivateKey |
loadPrivateKey(java.lang.String encodedPrivateKey)
Load the private key from a URL-safe base64 encoded string
|
static java.security.PublicKey |
loadPublicKey(java.lang.String encodedPublicKey)
Load the public key from a URL-safe base64 encoded string.
|
static byte[] |
savePrivateKey(org.bouncycastle.jce.interfaces.ECPrivateKey privateKey) |
static byte[] |
savePublicKey(org.bouncycastle.jce.interfaces.ECPublicKey publicKey) |
public static byte[] savePublicKey(org.bouncycastle.jce.interfaces.ECPublicKey publicKey)
public static byte[] savePrivateKey(org.bouncycastle.jce.interfaces.ECPrivateKey privateKey)
public static byte[] base64Decode(java.lang.String base64Encoded)
base64Encoded - public static java.security.PublicKey loadPublicKey(java.lang.String encodedPublicKey)
throws java.security.NoSuchProviderException,
java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
encodedPublicKey - java.security.NoSuchProviderExceptionjava.security.NoSuchAlgorithmExceptionjava.security.spec.InvalidKeySpecExceptionpublic static java.security.PrivateKey loadPrivateKey(java.lang.String encodedPrivateKey)
throws java.security.NoSuchProviderException,
java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
encodedPrivateKey - java.security.NoSuchProviderExceptionjava.security.NoSuchAlgorithmExceptionjava.security.spec.InvalidKeySpecException