Skip to content

KnugiHK/Hong-Kong-ID-Card-Verification-Algorithm-MultiLang

Repository files navigation

Hong-Kong-ID-Card-verification-algorithm

Python package

An algorithm for verifying Hong Kong ID Card number.

Features

  1. Verify a HKID
  2. Calculate check digit for a HKID

Supported Language

  1. Python (Development)
  2. JavaScript (May not up-to-date and higher translation priority)
  3. C# (May not up-to-date and lower translation priority)

Usage

Python

This algorithm is now support Python 2 and 3 Run in shell

python HKID_Verification.py
Please provide your Hong Kong ID Card number including letter and digit in bracket such as "L5555550" (For security reason, value you typed will not be displayed): AY987654A

Run as library

from HKID_Verification import verify 
ID = "AY987654A"
print(verify(id))

JavaScript

Place .js file in the path you want and add a <script> tag to link the file to webpage and call function with "HKIDverification(id)" where "(id)" is target HKID Card number

C#

To-Do....

To-Do

  1. New feature: HKID Card number generator
  2. Documentation and usage

About

An algorithm for verifying Hong Kong ID Card (HKID) number in different languages

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published