1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-25 03:57:58 +01: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 // encoded using Base64 as specified in Section 4 of RFC 4648
// (note: the Base64 output MUST NOT include whitespace and MUST set // (note: the Base64 output MUST NOT include whitespace and MUST set
// padding bits to zero). // 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); return Base64.encodeBytes(digest);
} }