Closed raghuveer closed 2 years ago
Does it? No.
Could it? Maybe in PHP 8.1 with Fibers.
thank you for the update :)
If you use KeyFactory::export()
and the KeyFactory::import*Key()
methods, you can avoid the blocking file operations APIs entirely.
We are using Amphp framework based libraries in one of our applications, to have asynchronous & non-blocking operations happening, and while we are using the mysql & redis libraries of Amphp, considering their filesystem handling library for read/write operations etc on the file system.
when checked, loadKeyFile method of KeyFactory class (https://github.com/paragonie/halite/blob/master/src/KeyFactory.php) uses file_get_contents php function, that is a blocking one, and I would like to know if Halite supports asynchronous & non-blocking operations with other operations like key generation, symmetric & asymmetric encryption & digital signature kind of operations
please share your inputs on this @paragonie-scott
thank you