All Projects → speps → Go Hashids

speps / Go Hashids

Licence: mit
Go (golang) implementation of http://www.hashids.org

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Go Hashids

Eloquent Hashids
On-the-fly hashids for Laravel Eloquent models. (🍰 Easy & ⚡ Fast)
Stars: ✭ 196 (-76.39%)
Mutual labels:  hashids
objection-hashid
Objection plugin to automatically obfuscate model ids using hashids!
Stars: ✭ 13 (-98.43%)
Mutual labels:  hashids
Django Hashid Field
Django Model Field that uses Hashids to obscure the value
Stars: ✭ 256 (-69.16%)
Mutual labels:  hashids
laravel-hashids
Laravel package for Hashids
Stars: ✭ 52 (-93.73%)
Mutual labels:  hashids
hashids.pm
Hashids, ported for Perl
Stars: ✭ 15 (-98.19%)
Mutual labels:  hashids
harsh
Hashids implementation in Rust
Stars: ✭ 48 (-94.22%)
Mutual labels:  hashids
Hashids.github.io
Hashids website
Stars: ✭ 163 (-80.36%)
Mutual labels:  hashids
Hashids.net
A small .NET package to generate YouTube-like hashes from one or many numbers. Use hashids when you do not want to expose your database ids to the user.
Stars: ✭ 470 (-43.37%)
Mutual labels:  hashids
eloquent-hashids
Automatically generate and persist Hashids for newly created Eloquent models.
Stars: ✭ 17 (-97.95%)
Mutual labels:  hashids
bashids
Pure Bash implementation of the hashid algorithm from http://hashids.org/
Stars: ✭ 38 (-95.42%)
Mutual labels:  hashids
django-hashids
Non-intrusive hashids library for Django
Stars: ✭ 26 (-96.87%)
Mutual labels:  hashids
hashids-bundle
Integrates hashids/hashids in a Symfony project
Stars: ✭ 43 (-94.82%)
Mutual labels:  hashids
laravel-hashid
HashId Implementation on Laravel Eloquent ORM
Stars: ✭ 23 (-97.23%)
Mutual labels:  hashids
Hashid Rails
Use Hashids (http://hashids.org/ruby/) in your Rails app ActiveRecord models.
Stars: ✭ 225 (-72.89%)
Mutual labels:  hashids
Hashids.js
A small JavaScript library to generate YouTube-like ids from numbers.
Stars: ✭ 3,525 (+324.7%)
Mutual labels:  hashids
Django Rest Framework Serializer Extensions
Extensions to help DRY up Django Rest Framework serializers
Stars: ✭ 180 (-78.31%)
Mutual labels:  hashids
id-mask
IDMask is a Java library for masking internal ids (e.g. from your DB) when they need to be published to hide their actual value and to prevent forging. It has support optional randomisation has a wide support for various Java types including long, UUID and BigInteger. This library bases its security on strong cryptographic primitives.
Stars: ✭ 39 (-95.3%)
Mutual labels:  hashids
Hashids
A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.
Stars: ✭ 4,596 (+453.73%)
Mutual labels:  hashids
Laravel Hashid
Obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.
Stars: ✭ 354 (-57.35%)
Mutual labels:  hashids
idy
👓 An ID obfuscator for ActiveRecord
Stars: ✭ 15 (-98.19%)
Mutual labels:  hashids

go-hashids Build Status GoDoc

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

Original implementations by Ivan Akimov

Setup

go get github.com/speps/go-hashids

CLI tool :

go get github.com/speps/go-hashids/cmd/hashid

Example

package main

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

func main() {
	hd := hashids.NewData()
	hd.Salt = "this is my salt"
	hd.MinLength = 30
	h, _ := hashids.NewWithData(hd)
	e, _ := h.Encode([]int{45, 434, 1313, 99})
	fmt.Println(e)
	d, _ := h.DecodeWithError(e)
	fmt.Println(d)
}

Thanks to all the contributors

Let me know if I forgot anyone of course.

Changelog

2017/05/09

  • Changed API
    • New methods now return errors
    • Added sanity check in Decode that makes sure that the salt is consistent

2014/09/13

  • Updated to Hashids v1.0.0 (should be compatible with other implementations, let me know if not, was checked against the Javascript version)
  • Changed API
    • Encrypt/Decrypt are now Encode/Decode
    • HashID is now constructed from HashIDData containing alphabet, salt and minimum length
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].