Skip to content

noblesamurai/node-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-php

Purpose

A node.js module implementing legacy PHP compatibility methods, currently just the md5 version of crypt.

Installation

npm install php

Usage

php = require( 'php' );

php.md5crypt( 'password', '$1$salt$hash' );

Check a user password against an existing md5 hashed password

php.md5crypt( 'password' );

Generate a salted, hashed password

php.encode_session( { 'key1': 'value1' } );

Return a PHP encoded session string

php.decode_session( 'key1|s:6:"value1";' );

Return a JavaScript object

php.generate_session()

Generates a random alphanumeric 26 character session compatible with PHP

About

PHP compatibility helpers for node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%