Skip to content

Commit

Permalink
Fix 32-bit support for public-key encryption.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Sep 14, 2018
1 parent 3f2fd07 commit c9ef28e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,9 @@ public static function crypto_box_keypair()
if (self::use_fallback('crypto_box_keypair')) {
return (string) call_user_func('\\Sodium\\crypto_box_keypair');
}
if (PHP_INT_SIZE === 4) {
return ParagonIE_Sodium_Crypto32::box_keypair();
}
return ParagonIE_Sodium_Crypto::box_keypair();
}

Expand Down

0 comments on commit c9ef28e

Please sign in to comment.