in main/src/main/java/org/apache/james/jdkim/tagvalue/SignatureRecordTemplate.java [299:313]
public SignatureRecordImpl toSignatureRecord(SigningAlgorithm algorithm, HashMethod hashMethod, byte[] bodyHash, byte[] signature) {
setValue("a", algorithm.asTagValue() + "-" + hashMethod.asTagValue());
String bodyHashTagValue = new String(Base64.encodeBase64(bodyHash));
setValue("bh", bodyHashTagValue);
String signatureTagValue = new String(Base64.encodeBase64(signature));
setValue("b", signatureTagValue);
// If a t=; parameter is present in the signature, make sure to
// fill it with the current timestamp
if (getValue("t") != null && getValue("t").toString().trim().isEmpty()) {
setValue("t", "" + (System.currentTimeMillis() / 1000));
}
return new SignatureRecordImpl(this.toString());
}