mirror of https://github.com/zlatinb/muwire
trim whitespaces before signing
parent
7b34b0cffc
commit
367a43825f
|
@ -29,7 +29,7 @@ class SignController {
|
|||
@ControllerAction
|
||||
void sign() {
|
||||
String plain = view.plainTextArea.getText()
|
||||
byte[] payload = plain.getBytes(StandardCharsets.UTF_8)
|
||||
byte[] payload = plain.trim().getBytes(StandardCharsets.UTF_8)
|
||||
def sig = DSAEngine.getInstance().sign(payload, core.spk)
|
||||
view.signedTextArea.setText(Base64.encode(sig.data))
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class SignServlet extends HttpServlet {
|
|||
return;
|
||||
}
|
||||
|
||||
byte [] payload = text.getBytes(StandardCharsets.UTF_8);
|
||||
byte [] payload = text.trim().getBytes(StandardCharsets.UTF_8);
|
||||
Signature sig = DSAEngine.getInstance().sign(payload, core.getSpk());
|
||||
|
||||
String response = Base64.encode(sig.getData());
|
||||
|
|
Loading…
Reference in New Issue