public class IscheduleDKIMSigner extends DKIMCommon
deepDebug
Constructor and Description |
---|
IscheduleDKIMSigner(PrivateKey privateKey) |
IscheduleDKIMSigner(String signatureRecordTemplate,
PrivateKey privateKey) |
Modifier and Type | Method and Description |
---|---|
static PrivateKey |
getPrivateKey(String privateKeyPKCS8)
Generate a PrivateKey from a Base64 encoded private key.
|
BodyHasher |
newBodyHasher(SignatureRecord signRecord) |
SignatureRecord |
newSignatureRecordTemplate(String record) |
String |
sign(Headers reqHeaders,
BodyHasher bh) |
String |
sign(Headers headers,
InputStream is) |
debugMsg, signatureCheck, streamCopy, trace, updateSignature
public IscheduleDKIMSigner(PrivateKey privateKey)
public IscheduleDKIMSigner(String signatureRecordTemplate, PrivateKey privateKey)
public SignatureRecord newSignatureRecordTemplate(String record)
public BodyHasher newBodyHasher(SignatureRecord signRecord) throws PermFailException
PermFailException
public String sign(Headers headers, InputStream is) throws IOException, FailException
headers
- http headersis
- stream for content.IOException
- on errorFailException
- on errorpublic String sign(Headers reqHeaders, BodyHasher bh) throws PermFailException
PermFailException
public static PrivateKey getPrivateKey(String privateKeyPKCS8) throws NoSuchAlgorithmException, InvalidKeySpecException
openssl pkcs8 -topk8 -inform PEM -in rsapriv.pem -outform DER -nocrypt -out rsapriv.der
And then base64 encode the content.privateKeyPKCS8
- a Base64 encoded string of the RSA key in PKCS8 formatNoSuchAlgorithmException
- if RSA is unknownInvalidKeySpecException
- on bad input keyCopyright © 2008–2015. All rights reserved.