PUB - Type of PublicKeyPRV - Type of PrivateKeypublic interface KeyEntryResolver<PUB extends PublicKey,PRV extends PrivateKey>
Class<PRV> getPrivateKeyType()
Class of the PrivateKey that matches the
public oneCollection<String> getSupportedTypeNames()
Collection of OpenSSH key type names that
are supported by this decoder - e.g., ECDSA keys have several curve names.
Caveat: this collection may be un-modifiable...default 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 typegetPublicKeyType(),
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) throws IOException
IOExceptionstatic String decodeString(InputStream s, String charset) throws IOException
IOExceptionstatic String decodeString(InputStream s, Charset cs) throws IOException
IOExceptionstatic BigInteger decodeBigInt(InputStream s) throws IOException
IOExceptionstatic byte[] readRLEBytes(InputStream s) throws IOException
IOExceptionstatic int decodeInt(InputStream s) throws IOException
IOExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.