Jetpack::generate_secrets PHP Method

generate_secrets() public method

Note these tokens are unique per call, NOT static per site for connecting.
Since: 2.6
public generate_secrets ( $action, $exp = 600 ) : array
return array
    public function generate_secrets($action, $exp = 600)
    {
        $secret = wp_generate_password(32, false) . ':' . wp_generate_password(32, false) . ':' . (time() + $exp) . ':' . get_current_user_id();
        // ties the secrets to the current user
        Jetpack_Options::update_option($action, $secret);
        return Jetpack_Options::get_option($action);
    }
Jetpack