1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-06-16 00:24:52 +02:00

Make digest() in EntityCapsManager synchronized

Fixes SMACK-617
This commit is contained in:
Florian Schmaus 2014-11-14 21:02:18 +01:00
parent 4000adb70c
commit a848437284

View file

@ -654,7 +654,10 @@ public class EntityCapsManager extends Manager {
// encoded using Base64 as specified in Section 4 of RFC 4648
// (note: the Base64 output MUST NOT include whitespace and MUST set
// padding bits to zero).
byte[] digest = md.digest(sb.toString().getBytes());
byte[] digest;
synchronized(md) {
digest = md.digest(sb.toString().getBytes());
}
return Base64.encodeBytes(digest);
}