mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
PBKDF2SHA512: chain methods in INT()
Simplify slightly by using a more functional-style approach.
This commit is contained in:
parent
e67401d7a5
commit
053cd60dc5
1 changed files with 4 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue