與包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