edu.vt.middleware.crypt.io
Interface CredentialReader<T>

Type Parameters:
T - Type of credential to read.
All Known Implementing Classes:
AbstractEncodedCredentialReader, PrivateKeyCredentialReader, PublicKeyCredentialReader, SecretKeyCredentialReader, X509CertificateCredentialReader, X509CertificatesCredentialReader

public interface CredentialReader<T>

Reads a security credential (e.g. key, certificate) from a resource.

Version:
$Revision: 1818 $
Author:
Middleware Services

Method Summary
 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.
 

Method Detail

read

T read(File file)
       throws IOException,
              CryptException
Reads a credential, commonly in encoded format, from the given file.

Parameters:
file - File from which to read credential.
Returns:
Credential read from file.
Throws:
IOException - On IO exceptions.
CryptException - On cryptography errors such as invalid formats, unsupported ciphers, illegal settings.

read

T read(InputStream in)
       throws IOException,
              CryptException
Reads a credential, commonly in encoded format, from the given input stream.

Parameters:
in - Input stream from which to read credential.
Returns:
Credential read from input stream.
Throws:
IOException - On IO exceptions.
CryptException - On cryptography errors such as invalid formats, unsupported ciphers, illegal settings.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.