1--TEST-- 2Check for libsodium scalarmult 3--EXTENSIONS-- 4sodium 5--FILE-- 6<?php 7$n = sodium_hex2bin("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"); 8$p = sodium_hex2bin("8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a"); 9$q = sodium_crypto_scalarmult($n, $p); 10 11var_dump(sodium_bin2hex($q)); 12try { 13 sodium_crypto_scalarmult(substr($n, 1), $p); 14} catch (SodiumException $ex) { 15 var_dump(true); 16} 17?> 18--EXPECT-- 19string(64) "4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742" 20bool(true) 21