Skip to content

Commit 584a1d2

Browse files
committed
add pecl stuff
1 parent cf87d4d commit 584a1d2

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ tests/**/*.sh
4242
tests/**/*.db
4343
tests/**/*.mem
4444
tmp-php.ini
45+
xpass-*.tgz

CREDITS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
xpass
2+
Remi Collet

bench.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
$deb = microtime(true);
4+
echo 'PASSWORD_BCRYPT: ';
5+
for($i=0; $i<10; $i++) {
6+
$h = password_hash("secret$i", PASSWORD_BCRYPT);
7+
}
8+
printf("%.3f\"\n", microtime(true) - $deb);
9+
10+
$deb = microtime(true);
11+
echo 'PASSWORD_ARGON2I: ';
12+
for($i=0; $i<10; $i++) {
13+
$h = password_hash("secret$i", PASSWORD_ARGON2I);
14+
}
15+
printf("%.3f\"\n", microtime(true) - $deb);
16+
17+
$deb = microtime(true);
18+
echo 'PASSWORD_ARGON2ID: ';
19+
for($i=0; $i<10; $i++) {
20+
$h = password_hash("secret$i", PASSWORD_ARGON2ID);
21+
}
22+
printf("%.3f\"\n", microtime(true) - $deb);
23+
24+
$deb = microtime(true);
25+
echo 'PASSWORD_SHA512: ';
26+
for($i=0; $i<10; $i++) {
27+
$h = password_hash("secret$i", PASSWORD_SHA512);
28+
}
29+
printf("%.3f\"\n", microtime(true) - $deb);
30+
31+
$deb = microtime(true);
32+
echo 'PASSWORD_YESCRYPT: ';
33+
for($i=0; $i<10; $i++) {
34+
$h = password_hash("secret$i", PASSWORD_YESCRYPT);
35+
}
36+
printf("%.3f\"\n", microtime(true) - $deb);
37+

package.xml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.8.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
3+
<name>xpass</name>
4+
<channel>pecl.php.net</channel>
5+
<summary>Extended password extension</summary>
6+
<description>
7+
This extension provides password hashing algorithms used by Linux distributions,
8+
using extended crypt library (libxcrypt).
9+
10+
* sha512 provided for legacy as used on some old distributions
11+
* yescrypt used on modern distributions
12+
</description>
13+
<lead>
14+
<name>Remi Collet</name>
15+
<user>remi</user>
16+
<email>[email protected]</email>
17+
<active>yes</active>
18+
</lead>
19+
<date>2024-08-27</date>
20+
<version>
21+
<release>1.0.0dev</release>
22+
<api>1.0.0</api>
23+
</version>
24+
<stability>
25+
<release>stable</release>
26+
<api>stable</api>
27+
</stability>
28+
<license uri="https://www.php.net/license/3_01.txt" filesource="LICENSE">PHP-3.01</license>
29+
<notes>
30+
- first release
31+
</notes>
32+
<contents>
33+
<dir name="/">
34+
<!-- sources -->
35+
<file name="config.m4" role="src"/>
36+
<file name="php_xpass.h" role="src" />
37+
<file name="xpass.c" role="src"/>
38+
<!-- documentation -->
39+
<file name="CREDITS" role="doc"/>
40+
<file name="LICENSE" role="doc"/>
41+
<file name="README.md" role="doc"/>
42+
<dir name ="tests">
43+
<file name="sha512.phpt" role="test"/>
44+
<file name="xpass.phpt" role="test"/>
45+
<file name="yescrypt.phpt" role="test"/>
46+
</dir>
47+
</dir>
48+
</contents>
49+
<dependencies>
50+
<required>
51+
<php>
52+
<min>8.0.0</min>
53+
</php>
54+
<pearinstaller>
55+
<min>1.10.0</min>
56+
</pearinstaller>
57+
</required>
58+
</dependencies>
59+
<providesextension>xpass</providesextension>
60+
<extsrcrelease/>
61+
<changelog>
62+
</changelog>
63+
</package>

0 commit comments

Comments
 (0)