PBKDF2SHA512: chain methods in INT()

Simplify slightly by using a more functional-style approach.
This commit is contained in:
Sean Gilligan 2023-09-16 16:56:41 -07:00 committed by Andreas Schildbach
parent e67401d7a5
commit 053cd60dc5

View file

@ -114,10 +114,9 @@ public class PBKDF2SHA512 {
}
private static byte[] INT(int i) {
ByteBuffer bb = ByteBuffer.allocate(4);
bb.order(ByteOrder.BIG_ENDIAN);
bb.putInt(i);
return bb.array();
return ByteBuffer.allocate(4)
.order(ByteOrder.BIG_ENDIAN)
.putInt(i)
.array();
}
}