Skip to content

Commit 899f5b6

Browse files
Update README and change namespaces (merge develop into master)
1 parent 26c3f1d commit 899f5b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+233
-183
lines changed

README.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
[Introduction](#introduction) | [Features](#features) | [Installation](#installation) | [How To Use Plugin](#how-to-use-plugin) | [F.A.Q](#faq) | [License](#license) | [Support](#support)
44

55
## Introduction
6-
<img src="https://cdn.virgilsecurity.com/assets/images/github/logos/pure_plugin.png" align="left" hspace="0" vspace="0"></a>
6+
<p><img src="https://cdn.virgilsecurity.com/assets/images/github/logos/pure_plugin.png" align="left" hspace="0" vspace="0"></p>
7+
78
Virgil Pure Wordpress Plugin is a free tool that protects user passwords from data breaches and both online and offline attacks, and renders stolen passwords useless even if your database has been compromised.
89

910
The Pure based on a powerful and revolutionary cryptographic technology that provides stronger and more modern security and can be used within any database or login system that uses a password, so it's accessible for business of any industry or size.
1011

1112
Learn more about the Pure technology [here](https://virgilsecurity.com/announcing-purekit).
1213

13-
1414
## Features
1515

1616
#### Available
@@ -30,26 +30,59 @@ The plugin is currently unavailable at the WP Store but you can get it by downlo
3030

3131
The package is available for PHP version 7.2.
3232

33-
#### Add the vsce_phe_php extension before using the plugin
33+
#### Step #1. Add the vsce_phe_php extension into your server before using the plugin
34+
35+
[Download](https://github.com/VirgilSecurity/virgil-pure-wordpress/releases/download/v0.1.1/virgil-test.zip), unzip and execute on your server [virgil-test.php](https://github.com/VirgilSecurity/virgil-pure-wordpress/_help/virgil-test.php) file.
36+
37+
[Download](https://github.com/VirgilSecurity/virgil-pure-wordpress/releases) and unzip *vsce_phe_php* extension according to your server operating system.
38+
39+
Make sure you have access to edit the php.ini file. For example, use *root*
40+
41+
$ sudo su
3442

35-
* [Download virgil-crypto-c-{latest version} archive from the CDN](https://cdn.virgilsecurity.com/virgil-crypto-c/php/) according to your server operating system
36-
* Place the *vsce_phe_php.{so/dll}* file from the archive (/lib folder) into the directory with extensions
37-
* Add the *extension=vsce_phe_php* string in to the php.ini file
38-
* Restart your web-service (apache or nginx): *sudo service {apache2/nginx} restart*
43+
Add the *extension=vsce_phe_php* string in to the php.ini file
3944

40-
##### Tips:
45+
$ echo "extension=vsce_phe_php” >> (PATH_TO_PHP.INI)
46+
47+
Copy extension file to the extensions directory.
48+
For the Linux/Darwin:
49+
50+
$ cp vsce_phe_php.so (PATH_TO_EXTENSION_DIR)
51+
52+
Or for the Windows:
4153

42-
* PHP version: *php --version*
43-
* php.ini: *php --ini | grep "Loaded Configuration File"*
44-
* Extension dir: *php -i | grep extension_dir*
54+
$ cp vsce_phe_php.dll (PATH_TO_EXTENSION_DIR)
55+
56+
Then, restart your server or php-fpm service!
4557

46-
#### Add plugin
58+
#### Installation example
4759

60+
Our web stack is: *Linux, nginx, php7.2-fpm*
61+
62+
- Execute the [virgil-test.php](https://github.com/VirgilSecurity/virgil-pure-wordpress/_help/virgil-test.php) to find out your path to php.ini file and path to the extension directory:
63+
<p><img src="https://raw.githubusercontent.com/VirgilSecurity/virgil-pure-wordpress/develop/_help/s-1.png"
64+
width="60%"></p>
65+
66+
- Then, go to the command line interface (CLI) to specify the paths from the previous step:
67+
<p><img src="https://raw.githubusercontent.com/VirgilSecurity/virgil-pure-wordpress/develop/_help/s-2.png" width="60%"></p>
68+
69+
- Reload the page in your browser to see that extension is loaded (`IS_EXTENSION_LOADED => TRUE`):
70+
<p><img src="https://raw.githubusercontent.com/VirgilSecurity/virgil-pure-wordpress/develop/_help/s-3.png"
71+
width="60%"></p>
72+
73+
So, now we can add the Virgil Pure Plugin to your server.
74+
75+
#### Step #2. Add Pure plugin
4876
- [Download the WordPress Virgil_Pure plugin](https://github.com/VirgilSecurity/virgil-pure-wordpress/releases)
49-
- Navigate to WordPress Dashboard
77+
- Navigate to the WordPress Dashboard
5078
- Open "Plugins → Add New" tab
5179
- Upload the Virgil_Pure.zip file
52-
- Activate the plugin
80+
- Activate the Plugin
81+
82+
As a result, you activated the Pure Plugin:
83+
<p><img src="https://raw.githubusercontent.com/VirgilSecurity/virgil-pure-wordpress/develop/_help/s-4.png" width="60%"></p>
84+
85+
Now, follow this README file to setup the Pure Plugin.
5386

5487
## How To Use Plugin
5588

Virgil_Pure.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
/**
44
* Plugin Name: Virgil Pure
5-
* Plugin URI: http://virgilsecurity.com/
5+
* Plugin URI: https://github.com/VirgilSecurity/virgil-pure-wordpress
66
* Description: Free tool that protects user passwords from data breaches and both online and offline attacks, and renders stolen passwords useless even if your database has been compromised. The Pure based on <a href="https://virgilsecurity.com/announcing-purekit" target="_blank">powerful and revolutionary cryptographic technology</a> that provides stronger and more modern security and can be used within any database or login system that uses a password, so it's accessible for business of any industry or size.
7-
* Version: 0.1.0
7+
* Version: 0.1.1
88
* Author: Virgil Security
99
* Author URI: http://virgilsecurity.com/
1010
* License: GPL-2.0+
@@ -17,25 +17,25 @@
1717

1818
require plugin_dir_path(__FILE__) . 'admin/core/vendor/autoload.php';
1919

20-
if (!defined('PLUGIN_PURE_CORE')) {
21-
define('PLUGIN_PURE_CORE', __DIR__ . DIRECTORY_SEPARATOR .'admin'. DIRECTORY_SEPARATOR. 'core');
20+
if (!defined('VIRGIL_PURE_CORE')) {
21+
define('VIRGIL_PURE_CORE', __DIR__ . DIRECTORY_SEPARATOR .'admin'. DIRECTORY_SEPARATOR. 'core');
2222
}
2323

24-
if (!defined('PLUGIN_PURE_CORE_ENV_FILE')) {
25-
define('PLUGIN_PURE_CORE_ENV_FILE', PLUGIN_PURE_CORE . DIRECTORY_SEPARATOR .'.env');
24+
if (!defined('VIRGIL_PURE_CORE_ENV_FILE')) {
25+
define('VIRGIL_PURE_CORE_ENV_FILE', VIRGIL_PURE_CORE . DIRECTORY_SEPARATOR .'.env');
2626
}
2727

28-
if(!is_file(PLUGIN_PURE_CORE_ENV_FILE)) {
29-
copy(PLUGIN_PURE_CORE_ENV_FILE."-example", PLUGIN_PURE_CORE_ENV_FILE);
28+
if(!is_file(VIRGIL_PURE_CORE_ENV_FILE)) {
29+
copy(VIRGIL_PURE_CORE_ENV_FILE."-example", VIRGIL_PURE_CORE_ENV_FILE);
3030
}
3131

32-
(new Dotenv(PLUGIN_PURE_CORE))->overload();
32+
(new Dotenv(VIRGIL_PURE_CORE))->overload();
3333

3434
if (!defined('WPINC')) {
3535
die;
3636
}
3737

38-
define('VIRGIL_PURE_VERSION', '0.1.0');
38+
define('VIRGIL_PURE_VERSION', '0.1.1');
3939

4040
function activate_Virgil_Pure()
4141
{

_help/s-1.png

86.2 KB
Loading

_help/s-2.png

65.3 KB
Loading

_help/s-3.png

85.8 KB
Loading

_help/s-4.png

104 KB
Loading

_help/virgil-test.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
$extension = 'vsce_phe_php';
4+
5+
$result = [
6+
'EXTENSION_NAME' => $extension,
7+
'OS' => PHP_OS,
8+
'PHP' => PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION,
9+
'PATH_TO_EXTENSION_DIR' => PHP_EXTENSION_DIR,
10+
'PATH_TO_PHP.INI' => php_ini_loaded_file(),
11+
'IS_EXTENSION_LOADED' => extension_loaded($extension),
12+
];
13+
14+
var_dump($result);
15+
exit();

admin/class-virgil-pure-admin.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22

3-
use Plugin\Pure\Background\MigrateBackgroundProcess;
4-
use Plugin\Pure\Background\UpdateBackgroundProcess;
5-
use Plugin\Pure\Config\Config;
6-
use Plugin\Pure\Config\Form;
7-
use Plugin\Pure\Config\Option;
8-
use Plugin\Pure\Core\CoreProtocol;
9-
use Plugin\Pure\Core\FormHandler;
10-
use Plugin\Pure\Core\passw0rdHash;
11-
use Plugin\Pure\Core\PluginValidator;
12-
use Plugin\Pure\Core\WPPasswordEnroller;
13-
use Plugin\Pure\Helpers\DBQueryHelper;
14-
use Plugin\Pure\Helpers\Redirector;
15-
use Plugin\Pure\Helpers\StatusHelper;
3+
use VirgilSecurityPure\Background\MigrateBackgroundProcess;
4+
use VirgilSecurityPure\Background\UpdateBackgroundProcess;
5+
use VirgilSecurityPure\Config\Config;
6+
use VirgilSecurityPure\Config\Form;
7+
use VirgilSecurityPure\Config\Option;
8+
use VirgilSecurityPure\Core\CoreProtocol;
9+
use VirgilSecurityPure\Core\FormHandler;
10+
use VirgilSecurityPure\Core\passw0rdHash;
11+
use VirgilSecurityPure\Core\PluginValidator;
12+
use VirgilSecurityPure\Core\WPPasswordEnroller;
13+
use VirgilSecurityPure\Helpers\DBQueryHelper;
14+
use VirgilSecurityPure\Helpers\Redirector;
15+
use VirgilSecurityPure\Helpers\StatusHelper;
1616

1717
/**
1818
* Class Virgil_Pure_Admin

admin/core/Background/BaseBackgroundProcess.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
* Lead Maintainer: Virgil Security Inc. <[email protected]>
3636
*/
3737

38-
namespace Plugin\Pure\Background;
38+
namespace VirgilSecurityPure\Background;
3939

4040
/**
4141
* Class BaseBackgroundProcess
42-
* @package Plugin\Pure\Background
42+
* @package VirgilSecurityPure\Background
4343
*/
4444
abstract class BaseBackgroundProcess extends WP_Background_Process
4545
{

admin/core/Background/MigrateBackgroundProcess.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@
3535
* Lead Maintainer: Virgil Security Inc. <[email protected]>
3636
*/
3737

38-
namespace Plugin\Pure\Background;
38+
namespace VirgilSecurityPure\Background;
3939

40-
use Plugin\Pure\Config\Config;
41-
use Plugin\Pure\Config\Log;
42-
use Plugin\Pure\Config\Option;
43-
use Plugin\Pure\Core\CoreProtocol;
44-
use Plugin\Pure\Core\Logger;
45-
use Plugin\Pure\Core\passw0rdHash;
40+
use VirgilSecurityPure\Config\Config;
41+
use VirgilSecurityPure\Config\Log;
42+
use VirgilSecurityPure\Config\Option;
43+
use VirgilSecurityPure\Core\CoreProtocol;
44+
use VirgilSecurityPure\Core\Logger;
45+
use VirgilSecurityPure\Core\passw0rdHash;
4646

4747
/**
4848
* Class MigrateBackgroundProcess
49-
* @package Plugin\Pure\Background
49+
* @package VirgilSecurityPure\Background
5050
*/
5151
class MigrateBackgroundProcess extends BaseBackgroundProcess
5252
{

0 commit comments

Comments
 (0)