public class MessageAuthentication extends Object
| Constructor | Description |
|---|---|
MessageAuthentication(String privateKey) |
Creates a new instance with a specific private key, that can then be used to sign messages.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
sign(String message) |
Signs a message by combining it with a private key, used for prevention of unauthorized changes of the message.
|
public MessageAuthentication(String privateKey)
privateKey - A private key that will be used as a secret in the signature. Must not be null or empty.IllegalArgumentException - If privateKey is null or empty.public String sign(String message)
message - The message that should be signed. Must not be null or empty.IllegalArgumentException - If message is null or empty.Copyright © 2019 Apptus Technologies AB. All rights reserved.