Skip to content

Commit

Permalink
Merge pull request #145 from paragonie/fix-autoload
Browse files Browse the repository at this point in the history
Guarantee Curve25519 is loaded from Ed25519
  • Loading branch information
paragonie-security authored Mar 30, 2022
2 parents ac99405 + 67e9432 commit 2ccc078
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Core/Ed25519.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
if (class_exists('ParagonIE_Sodium_Core_Ed25519', false)) {
return;
}
if (!class_exists('ParagonIE_Sodium_Core_Curve25519')) {
require_once dirname(__FILE__) . '/Curve25519.php';
}

/**
* Class ParagonIE_Sodium_Core_Ed25519
Expand Down
3 changes: 3 additions & 0 deletions src/Core32/Ed25519.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
if (class_exists('ParagonIE_Sodium_Core32_Ed25519', false)) {
return;
}
if (!class_exists('ParagonIE_Sodium_Core32_Curve25519')) {
require_once dirname(__FILE__) . '/Curve25519.php';
}

/**
* Class ParagonIE_Sodium_Core32_Ed25519
Expand Down

0 comments on commit 2ccc078

Please sign in to comment.