public class ArgsSigner extends ArgsCryptoBase
ARG_ALGORITHM, ARG_CERTIFICATES, ARG_CONTENT, ARG_HASH, ARG_SELECT, ARG_SIGNED, ARG_SIGNER, ARG_TYPE, ARG_VALUE, ARG_VERSION, DEFAULT_CERTIFICATE_TYPE, DEFAULT_DIGEST_ALGORITHM, DEFAULT_SELECT, DEFAULT_SIGNATURE_ALGORITHM, TYPE_ARGDSIG, VERSION_1_0| Constructor and Description |
|---|
ArgsSigner() |
| Modifier and Type | Method and Description |
|---|---|
IArgs |
sign(IArgs args,
List<String> fields,
String digestAlgorithm,
String signatureAlgorithm,
PrivateKey privateKey,
List<Certificate> certificates)
Sign the
IArgs structure, restricted to the subtree defined by
fields, using the provided algorithms. |
IArgs |
sign(IArgs args,
PrivateKey privateKey,
List<Certificate> certificates)
Sign the
IArgs structure with the provided private key. |
public IArgs sign(IArgs args, List<String> fields, String digestAlgorithm, String signatureAlgorithm, PrivateKey privateKey, List<Certificate> certificates) throws GeneralSecurityException
IArgs structure, restricted to the subtree defined by
fields, using the provided algorithms.args - to be signedfields - to filter the signed args. If empty, a default will be used.digestAlgorithm - If null, default SHA-256 will be usedsignatureAlgorithm - If null, default SHA256withRSA will be usedprivateKey - certificate - IArgs structure containing the signature on args,
restricted to the subtree defined by fields.GeneralSecurityExceptionpublic IArgs sign(IArgs args, PrivateKey privateKey, List<Certificate> certificates) throws GeneralSecurityException
IArgs structure with the provided private key.args - privateKey - a RSA private keycertificate - IArgs structure containing the signature on args,
restricted to the subtree defined by selected.GeneralSecurityExceptionCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.