|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FIM.Util.Crypto.SealedAndSignedObject
An object to contain another object which is first signed and afterwards encrypted. The data-object
must be serializable.
Based on SignedObject and SealedObject.
SignedObject
,
SealedObject
, Serialized FormField Summary | |
(package private) String |
cryptAlgorithm
The algorithm used for encryption. |
(package private) Serializable |
cryptData
Additional data to tell the recipient e. g. which public key was used for encryption. |
(package private) javax.crypto.SealedObject |
encrypted
The object containing the encrypted (and previously signed) data-object. |
Constructor Summary | |
SealedAndSignedObject(javax.crypto.Cipher c,
String cryptAlgo,
Serializable cryptData,
Signature s,
PrivateKey pk,
Certificate[] certs,
Serializable content)
Creates a new encrypted and signed object with a certain data-object. |
Method Summary | |
Certificate[] |
getCertificates(javax.crypto.Cipher c)
Retrieve the certificates associated with the signature. |
String |
getEncryptionAlgorithm()
Retrieve the algorithm used for encrypting the data. |
Serializable |
getEncryptionData()
Retrieve the additional data stored with encrypted object. |
Object |
getObject(javax.crypto.Cipher c)
Retrieve the encrypted data-object. |
String |
getSignAlgorithm(javax.crypto.Cipher c)
Retrieve the algorithm used for signing the data. |
boolean |
verify(javax.crypto.Cipher c,
KeyStore ks)
Verifies the signature of the object using a keystore. |
Methods inherited from class java.lang.Object |
|
Field Detail |
javax.crypto.SealedObject encrypted
String cryptAlgorithm
Serializable cryptData
Constructor Detail |
public SealedAndSignedObject(javax.crypto.Cipher c, String cryptAlgo, Serializable cryptData, Signature s, PrivateKey pk, Certificate[] certs, Serializable content) throws SignatureException, InvalidKeyException, IOException, javax.crypto.IllegalBlockSizeException
c
- the ciher to use for encrypting the objectcryptAlgo
- the algorithm to be used for encryptioncryptData
- the additional data as information for the recipients
- the signature to use for signing the objectpk
- the private key to be used for signingcerts
- the certificate chain for the public key to be used for verification of the signaturecontent
- the data-object to be signed and encryptedSignatureException
- if an error occured during singing the contentInvalidKeyException
- if the key could not be used for signingIOException
- If an error occured during serialization of the data object or the signed contentjavax.crypto.IllegalBlockSizeException
- if an error occured during encrypting the signed contentMethod Detail |
public String getEncryptionAlgorithm()
public Serializable getEncryptionData()
public String getSignAlgorithm(javax.crypto.Cipher c) throws ClassNotFoundException, IOException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException
c
- the Cipher
for decrypting the dataClassNotFoundException
- if the object could not be decrypted because a class was not foundIOException
- IO error decrypting the objectjavax.crypto.BadPaddingException
- padding error decrypting the objectjavax.crypto.IllegalBlockSizeException
- block size error decrypting the objectpublic Object getObject(javax.crypto.Cipher c) throws ClassNotFoundException, IOException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException
c
- the Cipher
for decrypting the dataClassNotFoundException
- if the object could not be decrypted because a class was not foundIOException
- IO error decrypting the objectjavax.crypto.BadPaddingException
- padding error decrypting the objectjavax.crypto.IllegalBlockSizeException
- block size error decrypting the objectpublic Certificate[] getCertificates(javax.crypto.Cipher c) throws ClassNotFoundException, IOException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException
c
- the Cipher
for decrypting the dataClassNotFoundException
- if the object could not be decrypted because a class was not foundIOException
- IO error decrypting the objectjavax.crypto.BadPaddingException
- padding error decrypting the objectjavax.crypto.IllegalBlockSizeException
- block size error decrypting the objectpublic boolean verify(javax.crypto.Cipher c, KeyStore ks) throws ClassNotFoundException, IOException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, InvalidKeyException, SignatureException, NoSuchAlgorithmException
c
- the cipher used for decrypting the objectks
- the key store used for verificationClassNotFoundException
- if the object could not be decrypted because a class was not foundIOException
- IO error decrypting the objectjavax.crypto.BadPaddingException
- padding error decrypting the objectjavax.crypto.IllegalBlockSizeException
- block size error decrypting the objectSignatureException
- if signature verification failedInvalidKeyException
- if the verification key is invalidNoSuchAlgorithmException
- if the algorihtm used for signing is not available
|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |