Skip to content

Commit 7ce4103

Browse files
authored
Update README examples and documentation
1 parent 0c998e0 commit 7ce4103

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ There are three main ways to use this library, and the appropriate choice will d
2323

2424
### Zero Allocation
2525

26-
The fastest use of this algorithm is to simply call `SipHasher.hash/2` which will call a zero-allocation implementation of the SipHash algorithm. This implementation should be used in most cases; specifically cases where you have frequently differing seed keys.
26+
The fastest use of this algorithm is to simply call `SipHash.hash/2` which will call a zero-allocation implementation of the SipHash algorithm. This implementation should be used in most cases; specifically cases where you have frequently differing seed keys.
2727

2828
```java
2929
import io.whitfin.siphash.SipHash;
@@ -49,7 +49,7 @@ import io.whitfin.siphash.SipHashContext;
4949

5050
// create a container from our key
5151
String key = "0123456789ABCDEF".getBytes();
52-
SipHashContext ctx = SipHasher.context(key);
52+
SipHashContext ctx = SipHash.context(key);
5353

5454
// hash using default compression (2-4)
5555
long hash1 = ctx.hash(data);
@@ -65,7 +65,7 @@ The final way to use the library is as a streaming digest; meaning that you can
6565
```java
6666
// create a container from our key
6767
String key = "0123456789ABCDEF".getBytes();
68-
SipHashStream hash = SipHasher.init(key);
68+
SipHashStream hash = SipHash.init(key);
6969

7070
// update several times
7171
hash.update("chu".getBytes());
@@ -78,7 +78,7 @@ long result = hash.digest();
7878

7979
## Formatting
8080

81-
By default, as of v2.0.0, all hashes are returned as a `long`. However, you can use `SipHasher.toHexString/1` to convert a hash to a hexidecimal String value.
81+
By default, as of v2.0.0, all hashes are returned as a `long`. However, you can use `SipHash.toHexString/1` to convert a hash to a hexidecimal String value.
8282

8383
```java
8484
// output will be padded (if necessary) to 16 bytes

0 commit comments

Comments
 (0)