Skip to content

Latest commit

 

History

History

session

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

session module


Access

gracenode.session

Configurations

"modules": {
	"session": {
		"hosts": ["server host or IP address"...],
		"ttl": int (in seconds),
		"options": object
	}
}

#####API: getSession

void getSession(String sessionId, Function callback)

Passes a session object to the callback

#####API: setSession

void setSession(String, sessionId, mixed value, Function callback)

encrypt module


Access

gracenode.encrypt

Configurations N/A

#####API: createHash

void createHash(String sourceStr, Int cost, Function callback)

Creates a hash with salt from sourceStr

This function uses bcrypt module and it is based on blowfish encryption.

bigger the cost the slower this function will become.

#####API: validateHash

void validateHash(String str, String hash, Function callback)

Validates a hash and str

#####API: createSalt

void createSalt(Int cost, Function callback)

Creates a salt.

#####API: uuid

String uuid(Int version, Object options, Buffer buffer, Array offset)

Creates a uuid. This module uses node-uuid module.

Possible values for version are 1 or 4

Version 1 is timestamp-base and version 4 is random-base