Responsive web Framework

DOCUMENTATION

Crypt

Contains the routines needed to produce encrypted or security data as identifiers

NOT AVAILABLE FOR TINY SCREENS

(minimum width: 480px)

Purpose

Provides encryption and decryption routines, such as generation of security codes or identifiers.

Description

The library has 5 functions:

newID(int)
The parameter is optional, it is a number (int) that indicates the maximum length of the string to be generated. Creates an alphanumeric identifier that can be accompanied by not a substring (_).
encodePwd(pwd,key)
Requires two stgrings as parameters; The first one (pwd) is the password and the second (key) is the key with which it will be coded. Function that generates encryption of the password based on the key, usually the security code (private) that is generated during installation. Tradionally, it was used with the function crypt but this prevented portability to new installations or platforms other than LAMP.
sessionValue()
No parameters required. Generates a base64 identifier of a value based on time. Not recommended for generating identifiers.
encodeBase64TabbedData(arr)
Encrypts an array (arr) by separating the fields by tab and converting the string to base64.
decodeBase64TabbedData(str)
Reverse function; Takes a string (str) in base64, decrypts it, and delivers an array of fields previously separated by a tab.

Use

Generally used to retrieve information from cookies or generation of new data.

See it! icon execute code