|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.crypt.io.AbstractEncodedCredentialReader<T>
T - Type of credential handled by this class.public abstract class AbstractEncodedCredentialReader<T>
Base class for credential readers that handle credentials that can be described as a byte array.
| Field Summary | |
|---|---|
protected static org.bouncycastle.asn1.DERObjectIdentifier |
DSA_ID
DSA algorithm OID. |
protected static org.bouncycastle.asn1.DERObjectIdentifier |
EC_ID
EC algorithm OID. |
protected org.slf4j.Logger |
logger
Logger instance. |
protected static org.bouncycastle.asn1.DERObjectIdentifier |
RSA_ID
RSA algorithm OID. |
| Constructor Summary | |
|---|---|
AbstractEncodedCredentialReader()
|
|
| Method Summary | |
|---|---|
protected abstract T |
decode(byte[] encoded)
Decodes an encoded representation of a credential into a corresponding object. |
T |
read(File file)
Reads a credential, commonly in encoded format, from the given file. |
T |
read(InputStream in)
Reads a credential, commonly in encoded format, from the given input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.bouncycastle.asn1.DERObjectIdentifier DSA_ID
protected static final org.bouncycastle.asn1.DERObjectIdentifier EC_ID
protected static final org.bouncycastle.asn1.DERObjectIdentifier RSA_ID
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public AbstractEncodedCredentialReader()
| Method Detail |
|---|
public T read(File file)
throws IOException,
CryptException
read in interface CredentialReader<T>file - File from which to read credential.
IOException - On IO exceptions.
CryptException - On cryptography errors such as invalid formats,
unsupported ciphers, illegal settings.
public T read(InputStream in)
throws IOException,
CryptException
read in interface CredentialReader<T>in - Input stream from which to read credential.
IOException - On IO exceptions.
CryptException - On cryptography errors such as invalid formats,
unsupported ciphers, illegal settings.
protected abstract T decode(byte[] encoded)
throws CryptException
encoded - Encoded representation of credential.
CryptException - On decoding errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||