3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret = random_bytes(32); $public = sodium_crypto_scalarmult_base($secret); var_dump( sodium_bin2hex($secret), sodium_bin2hex($public) );
Output for 8.2.10
string(64) "84c5367fefed0e034d9a046cf7c2367945969d30340ec3cffd95de4168132ed6" string(64) "f02ad7466d3451e49f9aade2c6619b382b74c4d3fa6a29328d01d56684290a01"
Output for 8.2.4
string(64) "64a51aab9e7e415cb37c7c23fef3c26b93561147aff53fb1df98337ad97e1e88" string(64) "c020c420f8b6627ec960677ccb893be8a943272fffe73f131e8a14502ee54860"
Output for 7.4.9
string(64) "c51569465530ad64d9c05b30d252c08ad9f0373f04cdd14ac2aeae78b2de74d5" string(64) "3c56b51cdb0e038f5f96c3bee3236f1738b19283e01a7f00855fcecb74cbf674"
Output for 7.4.8
string(64) "736408a19646a69f9d41ca1b0171dc1159a57e67221e0d71a892df10e17c1d19" string(64) "129b39a3d5071780e02e75cc2211009821c185da0bfa86d7d9440acb58e8ce4a"
Output for 7.4.7
string(64) "a37bffce347bca1d8275d33f384370e4d56dfce49cc2caca80a4dad289e37369" string(64) "5578d05d5bfff5e952878c5321f7f0ea562252014e82db35dd722781d069e546"
Output for 7.4.6
string(64) "7bd1c1948cc04b61f2128bcc0b5c87e5848a03fad45706e316e4946233fb906b" string(64) "ef0cd02a357cf3f58c7c34249545ac27c4e6c1c0e32accbe64bca04f9a1f7e6a"
Output for 7.4.5
string(64) "64c666a06725084e4cb064c5fa4b455b05ec0b512e7d195f39507cf2c788c457" string(64) "b5881ae204a111b071df43d86d9de3d5eb32d83171e73484787b9f5f47994017"
Output for 7.4.4
string(64) "acfa8c9a2f32f61c57e6b8473a99ed9d1ea0e0c707125a238afb92417ce3fdda" string(64) "a705bc1c3003bd7c8c27470e2f200d9392ce49e1eae0a0e1b9ad51f36236970e"
Output for 7.4.3
string(64) "5614f0ca8f9383c95685620a0a0b092e20a99966e2dc24ca64a8726e62b77216" string(64) "f9bae42d3758c6a35e35d8dc7585507fcb41aefa4cedbf8f89feb0e5e508d702"
Output for 7.4.2
string(64) "3ff15544a7cd79987e4ba346954f7039a81b0b6a08ede6a732be8180e7ffcc2d" string(64) "e66023e05056cce72fedbf7bc908b3699cfc6719d0dbf3877310dd2884330a0e"
Output for 7.4.1
string(64) "0e0528545ab2c59dda0be54094082674617606139b1a0468b08cb4d709384ab5" string(64) "6171ea1660e204bbee1336ea6a85c238d2b4ca1e9753004184638e1c27e9c54a"
Output for 7.4.0
string(64) "32b9504570cf013b88934a09c59725da21923ee9094bc2bd6b5627e815641ad8" string(64) "9a13cd2ded4a1fa40725fc4e3cf1a762a2b3e78a608ea96200982b0af0a0d95d"
Output for 7.3.21
string(64) "935ec56e3e825efb45044bad7402a18879947775af3ff410984465005191a229" string(64) "8a7d6e91a9de86d80fa1f12226a9d7fbef97defd04d6c288c2183957e60a7e4b"
Output for 7.3.20
string(64) "921c56ba5b6844aec6815faa0c0c3a35acbb189ab330a58bbbeb59cd7ecc46a3" string(64) "b46fb59a7e3e47b5c3ccc6a1296bfc55ebdbfffc50dad800f69a7bbae0f2b820"
Output for 7.3.19
string(64) "91a5e353e5b84f411affb27daf0bc38fe58b0aa5221e2014a961db03639a03b6" string(64) "6f2c27babc851ef2105485b343104d5f4b8efb712b25e2fb514362212a42574d"
Output for 7.3.18
string(64) "65db2789c4c10190f8d3ea3c6ae1524d98fd0fd9fd75adf13412dcac2f677efe" string(64) "6bbe710b9394ef58eed3cc816c657e3bf416010d38cbe3a0803ca3bcabf38f1c"
Output for 7.3.17
string(64) "5a6b8beb08c8719dea5844bc253c3e786b0004ca7e4fcbb9b4e10c2b738e57f4" string(64) "08131a119dd7fb38632eca978f947fd58bd4b5a00783b3e5c540e00340e39e49"
Output for 7.3.16
string(64) "a630cb97bdc74d214a1c790588e15371f85630d507dcab4b1dbda83bda21693c" string(64) "c04348308d65eea507467ac06ad87c707707d2c8c67be3a87c40067b7693147b"
Output for 7.3.15
string(64) "e4f736a254fd0e78fe6cadf099080d706a1294b79c75fd65fb3892eca9617f0d" string(64) "2c4ff2770114611903cba9523f05895ea505e9c3c5cb4454ea33a2e191b00261"
Output for 7.3.14
string(64) "aa5614e20253b3cd8c8147bc3254b1d172ad9b63a1d18e6672c8648c5fb173df" string(64) "eb99705083419ae522f563d4542f4c3dc486e94c2c1cd2fda0f0a21642e7ff30"
Output for 7.3.13
string(64) "2eeb537f466e105f43b62906ab80f3e29e925d1cd553806379b58aaa3f6fe25f" string(64) "75473dc5b3ef2a8502fc924be2c35f389af951f08b35c41ef69109101b4b8931"
Output for 7.3.12
string(64) "a277e00b7004ec5d44ab2968fa9d9e88308f1f4b325370bcd99390fe543d105f" string(64) "a5c938842c88783ac81b9def5030817c16e25e18f7639f69d815a312810af86c"
Output for 7.3.11
string(64) "5fbd31692d0d70db5f6bd9724b423c7a76b91852812ee358e72bb61d40a53804" string(64) "52f7520e9e32c8cf05906fda32311e05d38ba446b38e3a8188f02165c140d13e"
Output for 7.3.10
string(64) "7a91ce4a8cb432b729f8a17ad1d82197ed118b816221de4951c6b2e7bdad9de2" string(64) "9f1c738e28d218eaee8ae1493c260a55f759b7ac740dd81081a478c59e0a7809"
Output for 7.3.9
string(64) "e355d1b2e52dc60c76a65c50ea50c79ca4967aa66600bd712588e19cb74cf4a9" string(64) "b8b1060b66a1ad62d894d50c7bb1cb169d8f4fa53f5ea128d46d1666fc98b330"
Output for 7.3.8
string(64) "172eae7f4e19d722b075e7f7e9afba6d294f8fba4e216fc39788d989c77ec273" string(64) "901c95f95fa5c441aa1275b9735e273803e8b5db1ce03c46f94b6ff9169d284f"
Output for 7.3.7
string(64) "c854d63f0731aacbe739127ff9315959202ec7cef2cff75f97649999e201f4cc" string(64) "9d8de09dc301a009eb6a6d7e74005022cb59bff5bc1fab377d670a85f1b74d78"
Output for 7.3.6
string(64) "f34f2d5bdadff7a05b795415eb50ba716b28918ec9dacdf493422f8588922cfb" string(64) "c23f0e75daf9d5a8a8cd23ad6469b82985c37175d0519158dc5d7bed720aa102"
Output for 7.3.5
string(64) "7a355ccae7bad571bb5f35a54e777d11211e7303b4b98717cebd2e8db5d93aab" string(64) "d67b2f6bfd190988d9d64c57631f643449c341a794c5c52c3113cacc26af707b"
Output for 7.3.4
string(64) "4ecc08818d8afbf1dffab17f39df1033580036c8a4d70d754c22e475af4d0910" string(64) "4b4621ff31b89881f7c13027108cb959740d85b7cd2ccbd47d6fe15a371ca615"
Output for 7.3.3
string(64) "5bf22ef454b68fcdc372b0f06e4d1aaf6ae411358a15f124ebaca4f4a90b3740" string(64) "07da91584198621019cd98d7841126cef5dcaf3487060848a5ac83e285b1a825"
Output for 7.3.2
string(64) "2249546bd8ebc643aaae26d9bf667f8418d616d9bac4f79e8ce6deec833603a3" string(64) "96c6b3f63df4fc2a37668f63f36329c9e24a682089e9a3d4a60695fb04560025"
Output for 7.3.1
string(64) "7104a565660658b8d3bcc7c6bbdf657f685631e65ceb07c9f31c4d7bab453066" string(64) "bd8b552bf6792775c16f2b85bd5686a7b8c9a09094a4f37128576e1852ff5068"
Output for 7.3.0
string(64) "fc7effaa635d48fcd385f3f0d42394ff72496bb8672a5f1cf5fe9ab2650fc1db" string(64) "8fe1ae9520d11f1a3f5745f731dd0034b24212ee816e7cb0a3ea1388655dfb54"
Output for 7.2.33
string(64) "2b6affeeca96da21b3b819ebdfa0ac46b7cea3f854dde339a9abf21270aa652c" string(64) "db30ee1097fe8315a9d081ba1971210e7a897bc37103323c941102818ce1ef06"
Output for 7.2.32
string(64) "faa453ec2d4e1c3163d09a1e444d3fee63c9a8635e6afcef71ae63ea4c4828fa" string(64) "9ec73c8ca0d3ccb2c4a94f22c533bc345e90738b2b5ce22bad63f3513659c026"
Output for 7.2.31
string(64) "f1ccfe985400b5402e0b896c5e513215009884576e8c588be86227b27a702ee5" string(64) "e7fb86d041b3bb307cf9f28f88c90235a1b887c6c6f9752e7df964f702ee1838"
Output for 7.2.30
string(64) "fef1d59c69c96bed465ba4203e9d56f831b515bd1b9a859159932b036c9a463f" string(64) "dd5b330f7af0c73f1c27212825eba5c289bd602510f2a25fbafb0531ffad0f0f"
Output for 7.2.29
string(64) "2817a5675e598172ec1aca70607c323042400d84611e176d6dd0e7331e80d44a" string(64) "12c3106e0e7019d2e8c3e54420d785cf8c61e4eaf766aafd304be6eb7a71ba07"
Output for 7.2.28
string(64) "a447cfd1efc7adcac8bec4bbf08fe0ef392aa3faaf0f09cb7b2a95a22b295cc4" string(64) "3b82166b4144abc4fbbf758693814d23fc9671d9be7ee99950904b311e4bf929"
Output for 7.2.27
string(64) "ed008ea468ffee45067f1a4dc583e26d8bb5520314f1aec508ae400598e7a403" string(64) "ac0742c84808c0f69b1c05cdd42a996ba175832fe4be2c740dca34045503fb68"
Output for 7.2.26
string(64) "7ef58f01fab48626e1592dd944a4d6af46437c09349725537251fa2eea29ecfd" string(64) "b8ea24a117a2481a3404431d6b2342b150bc7df014b3467515e3ed9334b87447"
Output for 7.2.25
string(64) "96f6bcaf66e5df6c88fc368cae4c88b359637a0cd76d929da3079856d5c97450" string(64) "a44356eca73bca63baa26b3c9941d192a8c257d472989bb52277a381ab294d10"
Output for 7.2.24
string(64) "2f8aa455a870157263413a4de202b1bfb4f0378288d8f6993dda9dbc871a363d" string(64) "597a090bfef606ba8733ca8268bec510f3f29e35be812a17fbc5e7198e2b6b24"
Output for 7.2.23
string(64) "95cb31caf553d944fab48a396a6ed1a13e80d12d7c1f0ce2e5581fdcf3e35219" string(64) "ada4ed149cde1f184dda5c6ec01963a90ae016e9fc27e07042cd191419d2f462"
Output for 7.2.22
string(64) "5e1c08d8688967b2f2e40dd94de8387c725c0b7e768cb9e9678288f62dd22186" string(64) "f7a2758d4d9ff6eae6587d3eddbdf479cbb5c619b615ef27c3f25e2c7ccf3006"
Output for 7.2.21
string(64) "0e5d0c63e0b0678e6aa7a0ad2aa44cb4516a2187a716a2dfcdfaced2a7601046" string(64) "cc3c1cba1fd6c0e7092985b7562e80b78f472d73bbba07266407390f13de4a15"
Output for 7.2.20
string(64) "63c9aa0042db6fef692d2af9198c652e06c53c20de65d5cd1e066586373583c2" string(64) "6b20d29a3024c78116c1759218792218d84bd00c86545a34e74d4dd33b523418"
Output for 7.2.19
string(64) "ccb3fd24877db4259d4c575b558f2a930673ea48ecee125cc77590782ce83954" string(64) "7b4fcab8423dba7f2c26cf67e3436484d9ff37481fe70f66e85e9c90c66dda43"
Output for 7.2.18
string(64) "7915087f52cc04c47ef503bc5f6e31a639b93da02cfcd1957d1aa0d66caa11fd" string(64) "1ce16b530ba10a5715092e3a7c4be6d0ab40c56178137d7671bb3918d9ac5410"
Output for 7.2.17
string(64) "87c357f2d977836de9b116cc12bb9bf8dd5c8b37573fc2fa5070cb9a89bfeb6d" string(64) "ba4bb010f62eb90877e8e51aea2bf762fac068055666b01c20730cf9cf6cec53"
Output for 7.2.16
string(64) "082e02e07f15e273c1168fb683af49b1c8e1a3bbde7aeac5df9cdd16c71c30a5" string(64) "5eed3b0e76d2161258234247325cd3ed487e945895a6e306b238727eef5aa866"
Output for 7.2.15
string(64) "5d28098560842399fcedc9f81ff9883db14ff2b94ab390bacc5053257f489ed4" string(64) "86fece46979829f3596f233aebdd983a1be8ff118e90040ad91a191673a94306"
Output for 7.2.14
string(64) "7b3ca6f83e8b1b67efaa6cc28cf29f7cdab3439cf9dbff78bafd8d6e52692016" string(64) "ddbccaca312f06cf4a47f26bd45d6cdcf73fd9dd0bd88d88bbd88d148361be49"
Output for 7.2.13
string(64) "b07e47f0f8678216350ae42d111335c367993bced296aeb79e710d617555cc0d" string(64) "471aed7b095ad3bd27961ccf8aab18d6c69c8bdc5a085bef98e4f8d61bb2d400"
Output for 7.2.12
string(64) "3cfae35fea93434d1d62fb21b5dbaf9057c1b3acd8d35cff158a66f3d17fd978" string(64) "d20f2b99c4ebe383fea596f1adf59d82ebbd193632c543e57631ed887f2c7b5e"
Output for 7.2.11
string(64) "45b9b29694dc0e59b71d7cb7c15672c0a56baf0f1fe8eda9cb0f140ed6926960" string(64) "27428a8dcb22c64dcc23ff2305b06cb5a08fc80f4579ae1d1cc3ff3a9977f33a"
Output for 7.2.10
string(64) "99eb42a2d2e54446ab47bbab64d0f1f6749bba9cc994bf417ff5e3029b963c4a" string(64) "c12b2293362293baf53dd57a3b80bcb72109f77b9888ba3dbbf73c92b2a9fb7b"
Output for 7.2.9
string(64) "3c957d3b85c4c3975a98134c7044c43f4deb5c0969c8a3e89cbcd4316c939b8d" string(64) "946392384c621e9ad86f06e4698960515fc073b3a3ddd6028fc52206069e3053"
Output for 7.2.8
string(64) "8e6a9d4371df58b1022a45c8acf097777351dc6f59f2647133f9ff655f05a7c9" string(64) "c96dd782445764469dd369316173b6166cce331864855660f65c857a3f2a9558"
Output for 7.2.7
string(64) "8f8797a2373c6c92622bc4dba8fa871ea4c931b9419d99aea848f47742e02cb2" string(64) "57f0f97eadd78db7399b84281faa05ec82acaf65a86812180f42296122984423"
Output for 7.2.6
string(64) "5dbb22daf56aa670a66526277e15a940cd2ca697f42d258f6808d72bf30f71d2" string(64) "4feef6dfdbe9bac2c7f165e48d6d617612bf76d9e2a4acea5680df023731a211"
Output for 7.2.5
string(64) "dfee26a658384435f80f825f5456e163723786be26047377374e18dea3e3d2bc" string(64) "4e5249e65aa3b182aedbc7fa101b0581181d174d5dc0c72661c30d39c4580625"
Output for 7.2.4
string(64) "44591cadc8ce8cc983ad70a60242a32aa0ebfbc0ce7bda02846641b4227365e9" string(64) "35900da3269dabb90c1424cb636d814e9e1d39ba2ad0333a993af421ac85155b"
Output for 7.2.3
string(64) "301ff12dfde3e20e2fda4d6b3d15b073ea116e2ac41b1db50ccf9b8102670c47" string(64) "c9a9a238e4cd6dac10a48e6f3b0c23ac6861850f4c496671fe2a4ae82bd1766e"
Output for 7.2.2
string(64) "daa451c95fa1b0aa0b858fcce0bfdb6905dd36aa4c247820c8f91cf41efe68d8" string(64) "6ee4d6490051f0db09a19be9a4a9b44370dd1851e80383f0d682288631d40b0c"
Output for 7.2.1
string(64) "5af04d950cb9239410d323fd37d28d9cf8f6d9877c824b5b0c9d4e30e1b3fe53" string(64) "ea72bef07df0f629211529b16f6de6e6bbc919df56e02b4de94cf932a3e0eb5e"
Output for 7.2.0
string(64) "c9a898c4b782c94a2e4f99cf90a454ed52d9056070ddf95ebb322a4ae64a874f" string(64) "0f859d3fe2036fc7bd904312fbeef4c5582de59c6110e67165dc191f85c30a19"
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Fatal error: Uncaught Error: Call to undefined function sodium_crypto_scalarmult_base() in /in/YBkZ8:4 Stack trace: #0 {main} thrown in /in/YBkZ8 on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.40
Fatal error: Call to undefined function random_bytes() in /in/YBkZ8 on line 3
Process exited with code 255.

preferences:
48 ms | 519 KiB | 5 Q