use of won.cryptography.rdfsign.WonSigner in project webofneeds by researchstudio-sat.
the class WonMessageSignerVerifier method sign.
public static WonMessage sign(PrivateKey privateKey, PublicKey publicKey, String privateKeyUri, WonMessage message) throws Exception {
Dataset msgDataset = message.getCompleteDataset();
SigningStage sigStage = new SigningStage(message);
addUnreferencedSigReferences(msgDataset, sigStage);
WonSigner signer = new WonSigner(msgDataset);
signContents(msgDataset, sigStage, signer, privateKey, privateKeyUri, publicKey);
signEnvelopes(msgDataset, sigStage, signer, privateKey, privateKeyUri, publicKey);
return new WonMessage(msgDataset);
}
Aggregations