/** * By default this constructor updates SignedBy and SignedWith, so even with no other calls to * update you get a meaningful signature out of build() * * @param signedBy * @param sKey */ public ECDSASignatureBuilder(String signedBy, ECKeyContents sKey) { super(); this.sKey = sKey; this.digest = new SHA1Digest(); this.references = new ArrayList<String>(); this.signedBy = signedBy; if (signedBy == null) throw new RuntimeException("Registration Handle cannot be null"); meta = new SignatureMetadata( SignatureAlgorithm.ECDSA, digest.getAlgorithmName(), sKey.getHandle(), signedBy); update(meta.getHandle() + ":SignedBy", signedBy); update(".SignedWith", sKey.getHandle()); }