Interface for creating an RSA signature. More...
Public Member Functions | |
| byte[] | sign (Source aSource, int aVersion, int aHashAlgorithm) |
| Compute an RSA signature. | |
| int | getSignatureSize () |
| Get the size of the signature that will be computed by sign(). | |
| byte[] | getSigningCertificate () |
| Get the signing certificate. | |
| int | getCertificateCount () |
| Get the number of available intermediate certificates. | |
| byte[] | getCertificate (int aIndex) |
| Get an intermediate certificate. | |
| String | getErrorMessage () |
| Get an error message for the last operation. | |
Static Public Attributes | |
| static final int | v_1_5 = 0 |
| RSA version (padding): RSA 1.5 (PKCS1-v1_5). | |
| static final int | v_2_0 = 1 |
| RSA version (padding): RSA 2.0 (OAEP). | |
| static final int | ha_sha1 = 1 |
| Hash algorithm: SHA-1. | |
| static final int | ha_sha256 = 2 |
| Hash algorithm: SHA-256. | |
| static final int | ha_sha384 = 3 |
| Hash algorithm: SHA-384. | |
| static final int | ha_sha512 = 4 |
| Hash algorithm: SHA-512. | |
| static final int | ha_ripemd160 = 5 |
| Hash algorithm: RIPEMD-160. | |
Interface for creating an RSA signature.
Selection of the certificate is up to the implementation.
| byte [] de.softpro.doc.SignRSA.getCertificate | ( | int | aIndex ) |
Get an intermediate certificate.
| [in] | aIndex | The zero-based index of the intermediate certificate, see getCertificateCount(). |
| int de.softpro.doc.SignRSA.getCertificateCount | ( | ) |
Get the number of available intermediate certificates.
| String de.softpro.doc.SignRSA.getErrorMessage | ( | ) |
Get an error message for the last operation.
After any method of this object has been called, this function shall return an error message (possibly empty if the most recently called method didn't fail).
| int de.softpro.doc.SignRSA.getSignatureSize | ( | ) |
| byte [] de.softpro.doc.SignRSA.getSigningCertificate | ( | ) |
Get the signing certificate.
| byte [] de.softpro.doc.SignRSA.sign | ( | Source | aSource, |
| int | aVersion, | ||
| int | aHashAlgorithm | ||
| ) |
Compute an RSA signature.
| [in] | aSource | An object providing data to be hashed and signed. |
| [in] | aVersion | RSA version (v_1_5 or v_2_0). |
| [in] | aHashAlgorithm | Hash algorithm (ha_sha1, ha_sha256, ha_sha384, ha_sha512, or ha_ripemd160). |
final int de.softpro.doc.SignRSA.ha_ripemd160 = 5 [static] |
Hash algorithm: RIPEMD-160.
final int de.softpro.doc.SignRSA.ha_sha1 = 1 [static] |
Hash algorithm: SHA-1.
final int de.softpro.doc.SignRSA.ha_sha256 = 2 [static] |
Hash algorithm: SHA-256.
final int de.softpro.doc.SignRSA.ha_sha384 = 3 [static] |
Hash algorithm: SHA-384.
final int de.softpro.doc.SignRSA.ha_sha512 = 4 [static] |
Hash algorithm: SHA-512.
final int de.softpro.doc.SignRSA.v_1_5 = 0 [static] |
RSA version (padding): RSA 1.5 (PKCS1-v1_5).
final int de.softpro.doc.SignRSA.v_2_0 = 1 [static] |
RSA version (padding): RSA 2.0 (OAEP).
This is used for signing TIFF documents.
1.7.2