]> granicus.if.org Git - php/commitdiff
sodium ext: use crypto_scalarmult_BYTES for points coordinates
authorFrank Denis <github@pureftpd.org>
Thu, 20 Jul 2017 20:30:58 +0000 (22:30 +0200)
committerFrank Denis <github@pureftpd.org>
Thu, 20 Jul 2017 20:30:58 +0000 (22:30 +0200)
Just for consistency.

ext/sodium/libsodium.c

index e0b5b91127a0a777e478401272634f27c74c8f33..96e3f7489b93ec7081715439e83ee51254ba8717 100644 (file)
@@ -2487,7 +2487,7 @@ PHP_FUNCTION(sodium_crypto_scalarmult)
                return;
        }
        if (n_len != crypto_scalarmult_SCALARBYTES ||
-               p_len != crypto_scalarmult_SCALARBYTES) {
+               p_len != crypto_scalarmult_BYTES) {
                zend_throw_exception(sodium_exception_ce, "scalar and point must be "
                                   "CRYPTO_SCALARMULT_SCALARBYTES bytes",
                                   0);