PUB - Type of PublicKeyPRV - Type of PrivateKeypublic interface KeyEntryResolver<PUB extends java.security.PublicKey,PRV extends java.security.PrivateKey> extends IdentityResourceLoader<PUB,PRV>
MAX_BIGINT_OCTETS_COUNT| Modifier and Type | Method and Description |
|---|---|
default java.security.KeyPair |
cloneKeyPair(java.security.KeyPair kp) |
PRV |
clonePrivateKey(PRV key) |
PUB |
clonePublicKey(PUB key) |
static java.math.BigInteger |
decodeBigInt(java.io.InputStream s) |
static int |
decodeInt(java.io.InputStream s) |
static java.lang.String |
decodeString(java.io.InputStream s,
java.nio.charset.Charset cs,
int maxChars) |
static java.lang.String |
decodeString(java.io.InputStream s,
int maxChars) |
static java.lang.String |
decodeString(java.io.InputStream s,
java.lang.String charset,
int maxChars) |
static int |
encodeBigInt(java.io.OutputStream s,
java.math.BigInteger v) |
static byte[] |
encodeInt(java.io.OutputStream s,
int v) |
static int |
encodeString(java.io.OutputStream s,
java.lang.String v) |
static int |
encodeString(java.io.OutputStream s,
java.lang.String v,
java.nio.charset.Charset cs) |
static int |
encodeString(java.io.OutputStream s,
java.lang.String v,
java.lang.String charset) |
default java.security.KeyPair |
generateKeyPair(int keySize) |
java.security.KeyFactory |
getKeyFactoryInstance() |
java.security.KeyPairGenerator |
getKeyPairGenerator() |
static byte[] |
readRLEBytes(java.io.InputStream s,
int maxAllowed) |
static int |
writeRLEBytes(java.io.OutputStream s,
byte... bytes) |
static int |
writeRLEBytes(java.io.OutputStream s,
byte[] bytes,
int off,
int len) |
getPrivateKeyType, getPublicKeyTypefindSupporterByKeyTypeName, getSupportedKeyTypesdefault java.security.KeyPair generateKeyPair(int keySize)
throws java.security.GeneralSecurityException
keySize - Key size in bitsKeyPair with the specified key sizejava.security.GeneralSecurityException - if unable to generate the pairdefault java.security.KeyPair cloneKeyPair(java.security.KeyPair kp)
throws java.security.GeneralSecurityException
kp - The KeyPair to be cloned - ignored if nullnull if no original pair)java.security.GeneralSecurityException - If failed to clone - e.g., provided key
pair does not contain keys of the expected typeIdentityResourceLoader.getPublicKeyType(),
IdentityResourceLoader.getPrivateKeyType()PUB clonePublicKey(PUB key) throws java.security.GeneralSecurityException
key - The PublicKey to clone - ignored if nullnull if no original key)java.security.GeneralSecurityException - If failed to clone the keyPRV clonePrivateKey(PRV key) throws java.security.GeneralSecurityException
key - The PrivateKey to clone - ignored if nullnull if no original key)java.security.GeneralSecurityException - If failed to clone the keyjava.security.KeyPairGenerator getKeyPairGenerator()
throws java.security.GeneralSecurityException
KeyPairGenerator suitable for this decoderjava.security.GeneralSecurityException - If failed to create the generatorjava.security.KeyFactory getKeyFactoryInstance()
throws java.security.GeneralSecurityException
KeyFactory suitable for the specific decoder typejava.security.GeneralSecurityException - If failed to create onestatic int encodeString(java.io.OutputStream s,
java.lang.String v)
throws java.io.IOException
java.io.IOExceptionstatic int encodeString(java.io.OutputStream s,
java.lang.String v,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionstatic int encodeString(java.io.OutputStream s,
java.lang.String v,
java.nio.charset.Charset cs)
throws java.io.IOException
java.io.IOExceptionstatic int encodeBigInt(java.io.OutputStream s,
java.math.BigInteger v)
throws java.io.IOException
java.io.IOExceptionstatic int writeRLEBytes(java.io.OutputStream s,
byte... bytes)
throws java.io.IOException
java.io.IOExceptionstatic int writeRLEBytes(java.io.OutputStream s,
byte[] bytes,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionstatic byte[] encodeInt(java.io.OutputStream s,
int v)
throws java.io.IOException
java.io.IOExceptionstatic java.lang.String decodeString(java.io.InputStream s,
int maxChars)
throws java.io.IOException
java.io.IOExceptionstatic java.lang.String decodeString(java.io.InputStream s,
java.lang.String charset,
int maxChars)
throws java.io.IOException
java.io.IOExceptionstatic java.lang.String decodeString(java.io.InputStream s,
java.nio.charset.Charset cs,
int maxChars)
throws java.io.IOException
java.io.IOExceptionstatic java.math.BigInteger decodeBigInt(java.io.InputStream s)
throws java.io.IOException
java.io.IOExceptionstatic byte[] readRLEBytes(java.io.InputStream s,
int maxAllowed)
throws java.io.IOException
java.io.IOExceptionstatic int decodeInt(java.io.InputStream s)
throws java.io.IOException
java.io.IOException