Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kexplo committed May 24, 2016
1 parent 65e9baf commit fb251be
Showing 1 changed file with 35 additions and 16 deletions.
51 changes: 35 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,42 @@ xxHashSharp

A pure C# implementation of [xxhash](http://code.google.com/p/xxhash/)

Example
----------

byte[] input = Encoding.UTF8.GetBytes("hello world");

xxHash hash = new xxHash();
hash.Init();
hash.Update(input, input.Count());
...
Console.WriteLine("{0:X}", hash.Digest());


## Installation

1. From Nuget

* Download from [Nuget](https://www.nuget.org/packages/xxHashSharp/)
* Also, run the following command in the Package Manager Console.

```
PM > Install-Package xxHashSharp
```

2. From Source
* You can just clone this repo.


## Example

```csharp
byte[] input = Encoding.UTF8.GetBytes("hello world");

xxHash hash = new xxHash();
hash.Init();
hash.Update(input, input.Count());
...
Console.WriteLine("{0:X}", hash.Digest());
```

or

byte[] input = Encoding.UTF8.GetBytes("hello world");
Console.WriteLine("{0:X}", xxHash.CalculateHash(input));
```csharp

byte[] input = Encoding.UTF8.GetBytes("hello world");
Console.WriteLine("{0:X}", xxHash.CalculateHash(input));
```

License
----------
## License

BSD 2-clause license.
BSD 2-clause license.

0 comments on commit fb251be

Please sign in to comment.