Custom security->hash() function

Hi there !

(First of all, PHP Version 7.0.14, Phalcon 3.0.3, Linux 4.4.48 Manjaro)

I was browsing through the security section and I encountered the hash function. From the docs, we are told the function is using the hash algorithm bcrypt

To solve this problem we can use hash algorithms as bcrypt.

But instead of using this algorithm, I'd instead like to use the BLAKE2 (Argon2i) algorithm, given by the libsodium library (note that it'll become the default algorithm provided by PHP starting from 7.2). Is there a way to define a custom hash() function action or would I need to use a custom function using the libsodium algorithms ?

  1. install PHP specific module (i.e. libsodium)
  2. extend hash method with your own implementation using new lib

That's brief but it'll get you into proper direction I guess.