Generate passwords for integer data.
File: |
Password.lib |
Version: |
1.0 |
Author: |
Marcus Johansson |
This library contains some few functions for generating passwords from integer data with limited range. Save files are so over-rated :)
Name |
Parameters |
Brief description |
|
procedure |
fmt$ |
Set format for passwords. |
|
function |
fileds[] |
Get password. |
|
function |
pwd$ |
Get fields from password. |
procedure PWD_SetFormat ( fmt$ )Set the format of the expected passwords. 'fmt' should be a sequence of the two characters 'x' and 'X'. 'x' represents an integer value in the range [0..31], and 'X' an integer in the range [0..1023]. If 'fmt' is set to "XXxx", the password will represent two [0..1023] integers followed by two [0..31] integers.
[ Back ] |
function PWD_GetPassword$ ( fileds[] )Return a password based on the format set with 'PWD_SetFormat'. 'fields' should contain as many integer values as there were characters in the string sent to 'PWD_SetFormat'. If any value is out of range, it will be cropped. The password uses only alpha and numeric characters. Every [0..31] element adds one character to the password, and every [0..1023] element adds two characters. The extra character at the end is a checksum to prevent password modification.
Return value [ Back ] |
function PWD_GetFields[] ( pwd$ )Convert the password 'pwd' back into integer values and return them as an array. If the password is incorrect, according to its checksum, an empty array is returned.
Return value [ Back ] |
Generated with NLDoc 20140630.