Skip to content

Commit

Permalink
Add example and setup to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
speps committed Sep 22, 2012
1 parent b808d83 commit 2594e65
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
@@ -1,7 +1,28 @@
go-hashids go-hashids
========== ==========


Go (golang) implementation of http://www.hashids.org Go (golang) v1 implementation of http://www.hashids.org
under MIT License (same as the original implementations) under MIT License (same as the original implementations)


Original implementations by Ivan Akimov at https://github.com/ivanakimov/hashids.php Original implementations by ivanakimov

### Setup
<pre>go get github.com/speps/go-hashids</pre>

### Example
```go
package main

import "fmt"
import "github.com/speps/go-hashids"

func main() {
h := hashids.New()
h.Salt = "this is my salt"
h.MinLength = 30
e := h.Encrypt([]int{45, 434, 1313, 99})
fmt.Println(e)
d := h.Decrypt(e)
fmt.Println(d)
}
```

0 comments on commit 2594e65

Please sign in to comment.