与包hashids,我可以从数字散列(编码和解码Ÿ) var Hashids = require("hashids"),
hashids = new Hashids("this is my salt", 8);
var id = hashids.encode(1);
存在一些类似的包获取哈希从字符串? (带编码/解码)
我试图使用Hashids,它在我手动输入要编码的数字时起作用,但如果尝试从每个表中对主键进行编码行。 models.py from hashids import Hashids
from django.db import models
class AddToDatabase(models.Model):
hashids = Hashids()
# has