rename regcode to aiidcode
This commit is contained in:
parent
ef70ad8250
commit
49dae31a01
@ -160,7 +160,7 @@ module.exports = {
|
|||||||
* @return {*}
|
* @return {*}
|
||||||
* @memberof TICrypto
|
* @memberof TICrypto
|
||||||
*/
|
*/
|
||||||
aiid_to_regcode (aiid) {
|
aiid_to_aiidcode (aiid) {
|
||||||
const alphabet = 'e5fcdg3hqa4b1n0pij2rstuv67mwx89klyz'
|
const alphabet = 'e5fcdg3hqa4b1n0pij2rstuv67mwx89klyz'
|
||||||
const base = 16367
|
const base = 16367
|
||||||
let num = (aiid + base) * (base - alphabet.length)
|
let num = (aiid + base) * (base - alphabet.length)
|
||||||
@ -182,7 +182,7 @@ module.exports = {
|
|||||||
* @return {*}
|
* @return {*}
|
||||||
* @memberof TICrypto
|
* @memberof TICrypto
|
||||||
*/
|
*/
|
||||||
regcode_to_aiid (code) {
|
aiidcode_to_aiid (code) {
|
||||||
if (typeof code === 'string' && /^[a-zA-Z0-9]+$/.test(code)) {
|
if (typeof code === 'string' && /^[a-zA-Z0-9]+$/.test(code)) {
|
||||||
const alphabet = 'e5fcdg3hqa4b1n0pij2rstuv67mwx89klyz'
|
const alphabet = 'e5fcdg3hqa4b1n0pij2rstuv67mwx89klyz'
|
||||||
const base = 16367
|
const base = 16367
|
||||||
|
Loading…
Reference in New Issue
Block a user