|
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.EncryptedDataOutputStreamDemo
public class EncryptedDataOutputStreamDemo
Demonstrates the usage of class EncryptedDataOutputStream
for
PBE encrypting data using the CMS type EnryptedData.
Constructor Summary | |
---|---|
EncryptedDataOutputStreamDemo()
Default constructor. |
Method Summary | |
---|---|
byte[] |
createEncryptedData(byte[] message,
char[] password)
Creates a CMS EncryptedData and wraps it into a ContentInfo. |
byte[] |
getEncryptedData(byte[] encoding,
char[] password)
Decrypts the encrypted content of the given EncryptedData object. |
static void |
main(java.lang.String[] argv)
Main method. |
void |
start()
Starts the demo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EncryptedDataOutputStreamDemo()
Method Detail |
---|
public byte[] createEncryptedData(byte[] message, char[] password) throws iaik.cms.CMSException, java.io.IOException
EncryptedData
and wraps it into a ContentInfo.
message
- the message to be encrypted, as byte representation
iaik.cms.CMSException
- if the EncryptedData
object cannot
be created
java.io.IOException
- if an I/O error occurspublic byte[] getEncryptedData(byte[] encoding, char[] password) throws iaik.cms.CMSException, java.io.IOException
encoding
- the encoded EncryptedData object, wrapped in a ContentInfopassword
- 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
- if an some error occurs
|
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 |
![]() |