|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface for representing data to be digitally signed, verified, encrypted or decrypted
| Field Summary | |
static java.lang.String |
ALG_AES128_CBC
Name of symmetric encryption algorithm AES (128 bit) in CBC mode. |
static java.lang.String |
ALG_DES_EDE3_CBC
Name of symmetric encryption algorithm triple DES in CBC mode. |
static java.lang.String |
ALG_MD5
Name of message digest algorithm MD5. |
static java.lang.String |
ALG_RC2_40_CBC
Name of symmetric encryption algorithm RC2 (40 bit) in CBC mode. |
static java.lang.String |
ALG_RC2_CBC
Name of symmetric encryption algorithm RC2 (128 bit) in CBC mode. |
static java.lang.String |
ALG_SHA
Name of message digest algorithm SHA-1. |
static int |
INC_CERT_CHAIN
Include certificate chain without root when creating a digital signature (default). |
static int |
INC_CERT_CHAIN_ROOT
Include certificate chain with root when creating a digital signature. |
static int |
INC_CERT_NONE
Do not include any certificates when creating a digital signature. |
static int |
INC_CERT_OWN
Include own certificate when creating a digital signature. |
| Method Summary | |
boolean |
decrypt(ISsfProfile profile)
Decrypts the given data. |
boolean |
encrypt(SsfSigRcpList rcpList,
ISsfPab pab)
Encrypts the given data. |
boolean |
encrypt(SsfSigRcpList rcpList,
ISsfPab pab,
java.lang.String symAlg)
Encrypts the given data. |
boolean |
sign(ISsfProfile profile)
Creates a digital siganture of the given data. |
boolean |
sign(ISsfProfile profile,
java.lang.String mdAlg,
int incCerts,
boolean detached)
Creates a digital siganture of the given data. |
boolean |
verify(ISsfPab pab,
SsfSigRcpList sigList)
Verifies a digital signature of the given data. |
boolean |
verify(ISsfPab pab,
SsfSigRcpList sigList,
ISsfData input,
java.security.cert.X509Certificate cert)
Verifies a digital signature of the given data. |
boolean |
writeTo(java.io.OutputStream Out)
Writes the changed data to an output stream |
| Field Detail |
public static final java.lang.String ALG_SHA
public static final java.lang.String ALG_MD5
public static final java.lang.String ALG_AES128_CBC
public static final java.lang.String ALG_DES_EDE3_CBC
public static final java.lang.String ALG_RC2_40_CBC
public static final java.lang.String ALG_RC2_CBC
public static final int INC_CERT_NONE
public static final int INC_CERT_OWN
public static final int INC_CERT_CHAIN
public static final int INC_CERT_CHAIN_ROOT
| Method Detail |
public boolean sign(ISsfProfile profile)
throws SsfInvalidKeyException
profile - containing the secret key of the signer sign(profile, INC_CERT_CHAIN, ALG_SHA1) SsfInvalidKeyException - if invalid key is used
public boolean sign(ISsfProfile profile,
java.lang.String mdAlg,
int incCerts,
boolean detached)
throws SsfInvalidKeyException,
SsfInvalidAlgException
profile - containing the secret key of the signermdAlg - message digest algorithm used to hash the dataincCerts - determine if certificates should be includeddetached - if true do not include data into signaturesign(profile, ALG_SHA, INC_CERT_CHAIN, false)SsfInvalidKeyException - if invalid key is usedSsfInvalidAlgException - if invalid algorithm is used
public boolean verify(ISsfPab pab,
SsfSigRcpList sigList)
throws SsfInvalidDataException
pab - personal address book containing trusted certificates (if
null, all certificates are considered as trusted, i.e.
the signer certificates must be validated by the caller)sigList - list of signer informationverify(pab, null, signer)SsfInvalidDataException - if given data is not digitally signed
public boolean verify(ISsfPab pab,
SsfSigRcpList sigList,
ISsfData input,
java.security.cert.X509Certificate cert)
throws SsfInvalidDataException
pab - personal address book containing trusted certificates (if
null, all certificates are considered as trusted, i.e.
the signer certificates must be validated by the caller)sigList - list of signer informationinput - unsigned data (provide only in case of detached signature,
in case of attached signature pass null)cert - certificate to be used for verification (if null,
use certificate included in signed data)true if (at least one) signature could be verifiedSsfInvalidDataException - if given data is not digitally signed
public boolean encrypt(SsfSigRcpList rcpList,
ISsfPab pab)
throws SsfInvalidKeyException
rcpList - list of recipients of encrypted datapab - personal address book containing trusted certificatesencrypt(rcp, pab, ALG_AES128_CBC)SsfInvalidKeyException - if invalid key is used
public boolean encrypt(SsfSigRcpList rcpList,
ISsfPab pab,
java.lang.String symAlg)
throws SsfInvalidKeyException,
SsfInvalidAlgException
rcpList - list of recipients of encrypted datapab - personal address book containing the certificate of the recipient
(if null, all certificates are considered as trusted)symAlg - name of symmetric encryption algorithmtrue if data could be encrypted for all recipientsSsfInvalidKeyException - if invalid key is usedSsfInvalidAlgException - if invalid algorithm is used
public boolean decrypt(ISsfProfile profile)
throws SsfInvalidKeyException,
SsfInvalidDataException
profile - containing the secret key of the recipienttrue if encrypted data could be decryptedSsfInvalidKeyException - if invalid key is usedSsfInvalidDataException - if given data is not encrypted
public boolean writeTo(java.io.OutputStream Out)
throws java.io.IOException
out - output streamtrue if data could be writtenjava.io.IOException - if an I/O error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||