Skip to content

Commit fefe3ff

Browse files
committed
Update Utils.java
A tiny optimization
1 parent b74b6ec commit fefe3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/i2p/crypto/eddsa/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ public static int negative(int b) {
3434
* @return 0 or 1, the value of the i'th bit in h
3535
*/
3636
public static int bit(byte[] h, int i) {
37-
return (h[i/8] >> (i%8)) & 1;
37+
return (h[i >> 3] >> (i & 7)) & 1;
3838
}
3939
}

0 commit comments

Comments
 (0)