PATH:
opt
/
alt
/
tests
/
alt-php71-pecl-libsodium_2.0.23-1.el8
/
tests
--TEST-- Check for libsodium scalarmult --SKIPIF-- <?php if (!extension_loaded("sodium")) print "skip"; ?> --FILE-- <?php $n = sodium_hex2bin("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"); $p = sodium_hex2bin("8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a"); $q = sodium_crypto_scalarmult($n, $p); var_dump(sodium_bin2hex($q)); try { sodium_crypto_scalarmult(substr($n, 1), $p); } catch (SodiumException $ex) { var_dump(true); } ?> --EXPECT-- string(64) "4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742" bool(true)
[-] crypto_hex.phpt
[edit]
[-] crypto_generichash.phpt
[edit]
[-] crypto_auth.phpt
[edit]
[-] crypto_secretstream.phpt
[edit]
[-] crypto_secretbox.phpt
[edit]
[-] pwhash_argon2i.phpt
[edit]
[-] crypto_aead.phpt
[edit]
[-] crypto_kx.phpt
[edit]
[-] crypto_box.phpt
[edit]
[-] crypto_scalarmult.phpt
[edit]
[-] installed.phpt
[edit]
[-] exception_trace_without_args.phpt
[edit]
[-] crypto_kdf.phpt
[edit]
[-] crypto_sign.phpt
[edit]
[+]
..
[-] version.phpt
[edit]
[-] inc_add.phpt
[edit]
[-] crypto_stream.phpt
[edit]
[-] crypto_shorthash.phpt
[edit]
[-] utils.phpt
[edit]