Session::generate_id()
Description #
Generate a cryptographically strong unique ID for the session token.
Source #
File: includes/class/class-session.php
protected function generate_id() { if ( ! class_exists( 'PasswordHash' ) ) { require_once ABSPATH . 'wp-includes/class-phpass.php'; } $hasher = new \PasswordHash( 8, false ); return md5( $hasher->get_random_bytes( 32 ) ); }
Expand full source code Collapse full source code View on GitHub: includes/class/class-session.php:116
Add your comment