tools.codec.pkcs
Class Crypt

java.lang.Object
  extended bytools.codec.pkcs.AbstractTool
      extended bytools.codec.pkcs.Crypt

public class Crypt
extends AbstractTool

Demonstrates encryption and decryption based on PKCS#7. Encryption requires the following parameters on top of those defined in AbstractTool:

Version:
"$Id: Crypt.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth
See Also:
EnvelopedData

Field Summary
static String DESCR
          The options descriptor.
protected  boolean dirty_
          Dirty flag, signals that the EnvelopedData must be saved.
protected  EnvelopedData p7m_
          The EnvelopedData structure.
 
Fields inherited from class tools.codec.pkcs.AbstractTool
keystore_, p_
 
Constructor Summary
Crypt()
           
 
Method Summary
protected  void addRecipients(EnvelopedData ed)
           
protected  EnvelopedData create()
           
static void main(String[] argv)
           
 void run(String[] argv)
           
protected  void unlock(EnvelopedData ed)
           
 
Methods inherited from class tools.codec.pkcs.AbstractTool
getCertificate, getKeyStore, getPrivateKey, loadContentInfo, saveContentInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCR

public static final String DESCR
The options descriptor.

See Also:
Constant Field Values

p7m_

protected EnvelopedData p7m_
The EnvelopedData structure.


dirty_

protected boolean dirty_
Dirty flag, signals that the EnvelopedData must be saved.

Constructor Detail

Crypt

public Crypt()
Method Detail

unlock

protected void unlock(EnvelopedData ed)
               throws GeneralSecurityException,
                      IOException,
                      ArgsParserException
Throws:
GeneralSecurityException
IOException
ArgsParserException

create

protected EnvelopedData create()
                        throws GeneralSecurityException,
                               ArgsParserException
Throws:
GeneralSecurityException
ArgsParserException

addRecipients

protected void addRecipients(EnvelopedData ed)
                      throws GeneralSecurityException,
                             IOException,
                             BadNameException,
                             ArgsParserException
Throws:
GeneralSecurityException
IOException
BadNameException
ArgsParserException

run

public void run(String[] argv)
         throws Exception
Throws:
Exception

main

public static void main(String[] argv)


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.