-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various fixes to avoid potential conflicts with php/php-src#1997
- Added Windows config script for building on Windows - Updated tests - Renamed constants from PASSWORD_ARGON* to ARGON*_PASSWORD to avoid potential conflicts with php/php-src#1997 - Bumping version for API change
- Loading branch information
1 parent
84b8918
commit a883d51
Showing
10 changed files
with
91 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// vim:ft=javascript | ||
// $Id$ | ||
|
||
ARG_WITH("argon2", "Argon2 support", "no"); | ||
|
||
if (PHP_ARGON2 != "no") { | ||
if (CHECK_LIB("Argon2Ref.lib", null, PHP_ARGON2) | ||
&& CHECK_HEADER_ADD_INCLUDE("argon2.h", "CFLAGS")) { | ||
AC_DEFINE('HAVE_ARGON2LIB', 1); | ||
} else { | ||
WARNING("Argon2 not enabled; libaries and headers not found"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
--TEST-- | ||
Tests Argon2 low memory RuntimeException | ||
Tests Argon2 exceptions | ||
--FILE-- | ||
<?php | ||
try { | ||
$hash = argon2_hash('test', PASSWORD_ARGON2I, ['m_cost' => 0]); | ||
$hash = argon2_hash('test', ARGON2_PASSWORD, ['m_cost' => 0]); | ||
} catch (RuntimeException $e) { | ||
var_dump($e->getMessage()); | ||
} | ||
|
||
try { | ||
$hash = argon2_hash('test', PASSWORD_ARGON2D, ['m_cost' => 0]); | ||
$hash = argon2_hash('test', ARGON2_PASSWORD, ['t_cost' => 0]); | ||
} catch (RuntimeException $e) { | ||
var_dump($e->getMessage()); | ||
} | ||
|
||
try { | ||
$hash = argon2_hash('test', ARGON2_PASSWORD, ['threads' => 0]); | ||
} catch (RuntimeException $e) { | ||
var_dump($e->getMessage()); | ||
} | ||
--EXPECT-- | ||
string(24) "Memory cost is too small" | ||
string(24) "Memory cost is too small" | ||
string(22) "Time cost is too small" | ||
string(13) "Too few lanes" |