1

I recently stumbled across this native method within PHP, thanks to overzealous use of autocomplete within my IDE:

sodium_crypto_secretstream_xchacha20poly1305_push(&$state, $string [, $string, $long])

Initially I assumed it to be nonsensical, and possibly a bug with my IDE. But, a Google search did in fact lead me to PHP's official documentation: https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-push.php

Unfortunately - the documentation actually doesn't state what it is for:

Warning This function is currently not documented; only its argument list is available.

A search on Stack Overflow gave me exactly 1 question: Read encrypted php files using ajax So, I assume this method has something to do with encryption.

In light of this - can anyone shed light on where one might use this method, and if there are any other accompanying methods that form part of the same "family".

Any (simple) code examples would also be potentially very helpful.

Alex Mulchinock
  • 2,119
  • 1
  • 18
  • 25

0 Answers0