PUB - Type of PublicKeyPRV - Type of PrivateKeypublic interface KeyEntryResolver<PUB extends PublicKey,PRV extends PrivateKey> extends IdentityResourceLoader<PUB,PRV>
MAX_BIGINT_OCTETS_COUNT| Modifier and Type | Method and Description |
|---|---|
default KeyPair |
cloneKeyPair(KeyPair kp) |
PRV |
clonePrivateKey(PRV key) |
PUB |
clonePublicKey(PUB key) |
static BigInteger |
decodeBigInt(InputStream s) |
static int |
decodeInt(byte[] buf) |
static int |
decodeInt(byte[] buf,
int offset,
int available) |
static int |
decodeInt(InputStream s) |
static Map.Entry<String,Integer> |
decodeString(byte[] buf,
Charset cs,
int maxChars) |
static Map.Entry<String,Integer> |
decodeString(byte[] buf,
int maxChars) |
static Map.Entry<String,Integer> |
decodeString(byte[] buf,
int offset,
int available,
Charset cs,
int maxChars)
Decodes a run-length encoded string
|
static Map.Entry<String,Integer> |
decodeString(byte[] buf,
int offset,
int available,
int maxChars) |
static String |
decodeString(InputStream s,
Charset cs,
int maxChars) |
static String |
decodeString(InputStream s,
int maxChars) |
static String |
decodeString(InputStream s,
String charset,
int maxChars) |
static int |
encodeBigInt(OutputStream s,
BigInteger v) |
static byte[] |
encodeInt(OutputStream s,
int v) |
static int |
encodeString(OutputStream s,
String v) |
static int |
encodeString(OutputStream s,
String v,
Charset cs) |
static int |
encodeString(OutputStream s,
String v,
String charset) |
default KeyPair |
generateKeyPair(int keySize) |
KeyFactory |
getKeyFactoryInstance() |
KeyPairGenerator |
getKeyPairGenerator() |
static Map.Entry<byte[],Integer> |
readRLEBytes(byte[] buf,
int maxAllowed) |
static Map.Entry<byte[],Integer> |
readRLEBytes(byte[] buf,
int offset,
int available,
int maxAllowed)
Decodes a run-length encoded byte array
|
static byte[] |
readRLEBytes(InputStream s,
int maxAllowed) |
static int |
writeRLEBytes(OutputStream s,
byte... bytes) |
static int |
writeRLEBytes(OutputStream s,
byte[] bytes,
int off,
int len) |
getPrivateKeyType, getPublicKeyTypefindSupporterByKeyTypeName, getSupportedKeyTypesdefault KeyPair generateKeyPair(int keySize) throws GeneralSecurityException
keySize - Key size in bitsKeyPair with the specified key sizeGeneralSecurityException - if unable to generate the pairdefault KeyPair cloneKeyPair(KeyPair kp) throws GeneralSecurityException
kp - The KeyPair to be cloned - ignored if nullnull if no original pair)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 GeneralSecurityException
key - The PublicKey to clone - ignored if nullnull if no original key)GeneralSecurityException - If failed to clone the keyPRV clonePrivateKey(PRV key) throws GeneralSecurityException
key - The PrivateKey to clone - ignored if nullnull if no original key)GeneralSecurityException - If failed to clone the keyKeyPairGenerator getKeyPairGenerator() throws GeneralSecurityException
KeyPairGenerator suitable for this decoderGeneralSecurityException - If failed to create the generatorKeyFactory getKeyFactoryInstance() throws GeneralSecurityException
KeyFactory suitable for the specific decoder typeGeneralSecurityException - If failed to create onestatic int encodeString(OutputStream s, String v) throws IOException
IOExceptionstatic int encodeString(OutputStream s, String v, String charset) throws IOException
IOExceptionstatic int encodeString(OutputStream s, String v, Charset cs) throws IOException
IOExceptionstatic int encodeBigInt(OutputStream s, BigInteger v) throws IOException
IOExceptionstatic int writeRLEBytes(OutputStream s, byte... bytes) throws IOException
IOExceptionstatic int writeRLEBytes(OutputStream s, byte[] bytes, int off, int len) throws IOException
IOExceptionstatic byte[] encodeInt(OutputStream s, int v) throws IOException
IOExceptionstatic String decodeString(InputStream s, int maxChars) throws IOException
IOExceptionstatic String decodeString(InputStream s, String charset, int maxChars) throws IOException
IOExceptionstatic String decodeString(InputStream s, Charset cs, int maxChars) throws IOException
IOExceptionstatic BigInteger decodeBigInt(InputStream s) throws IOException
IOExceptionstatic byte[] readRLEBytes(InputStream s, int maxAllowed) throws IOException
IOExceptionstatic int decodeInt(InputStream s) throws IOException
IOExceptionstatic Map.Entry<String,Integer> decodeString(byte[] buf, int offset, int available, int maxChars)
static Map.Entry<String,Integer> decodeString(byte[] buf, int offset, int available, Charset cs, int maxChars)
buf - The buffer with the data bytesoffset - The offset in the buffer to decode the stringavailable - The max. available data starting from the offsetcs - The Charset to use to decode the stringmaxChars - Max. allowed characters in string - if more than that is encoded then an
IndexOutOfBoundsException will be thrownreadRLEBytes(byte[], int, int, int)static Map.Entry<byte[],Integer> readRLEBytes(byte[] buf, int offset, int available, int maxAllowed)
buf - The buffer with the data bytesoffset - The offset in the buffer to decode the arrayavailable - The max. available data starting from the offsetmaxAllowed - Max. allowed data in decoded buffer - if more than that is encoded then an
IndexOutOfBoundsException will be thrownstatic int decodeInt(byte[] buf)
static int decodeInt(byte[] buf,
int offset,
int available)
Copyright © 2018–2020 The Apache Software Foundation. All rights reserved.