net.suberic.crypto
Interface PGPProviderImpl


public interface PGPProviderImpl

Something which decrypts PGP streams.


Method Summary
 boolean checkSignature(java.io.InputStream rawStream, byte[] signature, java.security.Key key)
          Checks a signature against a section of text.
 EncryptionKeyManager createKeyManager()
          Returns a KeyStore provider.
 EncryptionKeyManager createKeyManager(java.io.InputStream inputStream, char[] password)
          Returns a KeyStore provider.
 byte[] decrypt(java.io.InputStream encryptedStream, java.security.Key key)
          Decrypts a section of text using an EncryptionKey.
 byte[] encrypt(java.io.InputStream rawStream, java.security.Key key)
          Encrypts a section of text using an EncryptionKey.
 java.security.Key[] extractKeys(java.io.InputStream rawStream)
          Extracts public key information.
 byte[] packageKeys(java.security.Key[] keys)
          Packages up the public keys in a form to be sent as a public key message.
 byte[] sign(java.io.InputStream rawStream, java.security.Key key)
          Signs a section of text.
 

Method Detail

decrypt

public byte[] decrypt(java.io.InputStream encryptedStream,
                      java.security.Key key)
               throws java.security.NoSuchAlgorithmException,
                      java.io.IOException,
                      java.security.GeneralSecurityException
Decrypts a section of text using an EncryptionKey.

Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
java.security.GeneralSecurityException

encrypt

public byte[] encrypt(java.io.InputStream rawStream,
                      java.security.Key key)
               throws java.security.NoSuchAlgorithmException,
                      java.io.IOException,
                      java.security.GeneralSecurityException
Encrypts a section of text using an EncryptionKey.

Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
java.security.GeneralSecurityException

sign

public byte[] sign(java.io.InputStream rawStream,
                   java.security.Key key)
            throws java.security.NoSuchAlgorithmException,
                   java.io.IOException,
                   java.security.GeneralSecurityException
Signs a section of text.

Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
java.security.GeneralSecurityException

checkSignature

public boolean checkSignature(java.io.InputStream rawStream,
                              byte[] signature,
                              java.security.Key key)
                       throws java.security.NoSuchAlgorithmException,
                              java.io.IOException,
                              java.security.GeneralSecurityException
Checks a signature against a section of text.

Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
java.security.GeneralSecurityException

extractKeys

public java.security.Key[] extractKeys(java.io.InputStream rawStream)
                                throws java.security.GeneralSecurityException,
                                       java.io.IOException
Extracts public key information.

Throws:
java.security.GeneralSecurityException
java.io.IOException

packageKeys

public byte[] packageKeys(java.security.Key[] keys)
                   throws java.security.GeneralSecurityException,
                          java.io.IOException
Packages up the public keys in a form to be sent as a public key message.

Throws:
java.security.GeneralSecurityException
java.io.IOException

createKeyManager

public EncryptionKeyManager createKeyManager()
Returns a KeyStore provider.


createKeyManager

public EncryptionKeyManager createKeyManager(java.io.InputStream inputStream,
                                             char[] password)
                                      throws java.io.IOException,
                                             java.security.KeyStoreException,
                                             java.security.NoSuchAlgorithmException,
                                             java.security.NoSuchProviderException,
                                             java.security.cert.CertificateException
Returns a KeyStore provider.

Throws:
java.io.IOException
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
java.security.cert.CertificateException