We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92c078c commit 27214adCopy full SHA for 27214ad
1 file changed
src/xyz/pushpad/Pushpad.java
@@ -17,10 +17,10 @@ public Pushpad(String authToken, String projectId) {
17
}
18
19
public String signatureFor(String data) {
20
- SecretKeySpec signingKey = new SecretKeySpec(this.authToken.getBytes(), "HmacSHA1");
+ SecretKeySpec signingKey = new SecretKeySpec(this.authToken.getBytes(), "HmacSHA256");
21
String encoded = null;
22
try {
23
- Mac mac = Mac.getInstance("HmacSHA1");
+ Mac mac = Mac.getInstance("HmacSHA256");
24
mac.init(signingKey);
25
byte[] rawHmac = mac.doFinal(data.getBytes());
26
encoded = DatatypeConverter.printHexBinary(rawHmac).toLowerCase();
0 commit comments