|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdemo.cms.encryptedData.EncryptedDataDemo
public class EncryptedDataDemo
Demonstrates the usage of class EncryptedDataStream and
EncryptedData for encrypting data using the CMS type
EncryptedData.
| Constructor Summary | |
|---|---|
EncryptedDataDemo()
Default constructor. |
|
| Method Summary | |
|---|---|
byte[] |
createEncryptedData(byte[] message,
iaik.asn1.structures.AlgorithmID pbeAlgorithm,
char[] password)
Creates a CMS EncryptedData message. |
byte[] |
createEncryptedDataStream(byte[] message,
iaik.asn1.structures.AlgorithmID pbeAlgorithm,
char[] password)
Creates a CMS EncryptedDataStream message. |
byte[] |
getEncryptedData(byte[] encoding,
char[] password)
Decrypts the PBE-encrypted content of the given CMS EncryptedData object
using the specified password and returns the decrypted (= original) message. |
byte[] |
getEncryptedDataStream(byte[] encoding,
char[] password)
Decrypts the PBE-encrypted content of the given CMS EncryptedData object
using the specified password and returns the decrypted (= original) message. |
static void |
main(java.lang.String[] argv)
Maim method. |
void |
start()
Starts the tests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncryptedDataDemo()
| Method Detail |
|---|
public byte[] createEncryptedDataStream(byte[] message,
iaik.asn1.structures.AlgorithmID pbeAlgorithm,
char[] password)
throws iaik.cms.CMSException,
java.io.IOException
EncryptedDataStream message.
The supplied content is PBE-encrypted using the specified password.
message - the message to be encrypted, as byte representationpbeAlgorithm - the PBE algorithm to be usedpassword - the password
EncryptedData object just created
iaik.cms.CMSException - if the EncryptedData object cannot
be created
java.io.IOException - if an I/O error occurs
public byte[] getEncryptedDataStream(byte[] encoding,
char[] password)
throws iaik.cms.CMSException,
java.io.IOException
EncryptedData object
using the specified password and returns the decrypted (= original) message.
encoding - the EncryptedData object as DER encoded byte arraypassword - the password to decrypt the message
iaik.cms.CMSException - if the message cannot be recovered
java.io.IOException - if an I/O error occurs
public byte[] createEncryptedData(byte[] message,
iaik.asn1.structures.AlgorithmID pbeAlgorithm,
char[] password)
throws iaik.cms.CMSException,
java.io.IOException
EncryptedData message.
The supplied content is PBE-encrypted using the specified password.
message - the message to be encrypted, as byte representationpbeAlgorithm - the PBE algorithm to be usedpassword - the password
EncryptedData object just created
iaik.cms.CMSException - if the EncryptedData object cannot
be created
java.io.IOException - if an I/O error occurs
public byte[] getEncryptedData(byte[] encoding,
char[] password)
throws iaik.cms.CMSException,
java.io.IOException
EncryptedData object
using the specified password and returns the decrypted (= original) message.
encoding - the DER encoded EncryptedData objectpassword - the password to decrypt the message
iaik.cms.CMSException - if the message cannot be recovered
java.io.IOException - if an I/O error occurspublic void start()
public static void main(java.lang.String[] argv)
throws java.lang.Exception
java.lang.Exception
|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
|
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
|