首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > Python模块产生不区分大小写的字母数字ID从短整数

Python模块产生不区分大小写的字母数字ID从短整数

资 源 简 介

This module was created to generate short alphanumeric ids for a discount coupon application. It can also be useful to generate shared session keys for games and any other application where you need an easy to share alphanumeric code. It can be used as a short hash for integers, but in fact is uses a base 32 notation that has the following attributes: Collision-free 1 to 1 mapping for positive integers Somewhat compact: encodes 5 bit per digit Generates a case insensitive code Pads to a given number of digits Does not use "L"/"l", "I"/"i" and "O","o" to avoid mistakes with "zero" and "one". Optional Luhn mod N algorithm included for checksum digit generation Maximum range can be calculated as 32 elevated to the number of digits used. You can customize FW_MAP and BW_MAP to make codes harder to guess, but this algorithm was not designed to be crypto safe. In my map I made 0=A bec

文 件 列 表

py-cupom
py_cupom.py
test.py

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP