SMOOTSARA Active Member Licensed User Longtime User Oct 9, 2021 #1 Hi How can I use this php library in b4a? random_bytes(PHP 7, PHP 8) random_bytes — Generates cryptographically secure pseudo-random bytes Description ¶random_bytes(int $length): string https://www.php.net/manual/en/function.random-bytes.php
Hi How can I use this php library in b4a? random_bytes(PHP 7, PHP 8) random_bytes — Generates cryptographically secure pseudo-random bytes Description ¶random_bytes(int $length): string https://www.php.net/manual/en/function.random-bytes.php
Sandman Expert Licensed User Longtime User Oct 9, 2021 #2 By setting up an api and calling it from your app. Which obviously is total nonsense. The better question is probably something like "How do I generate cryptographically secure pseudo-random bytes, sort of like the function random_bytes in PHP?" Upvote 0
By setting up an api and calling it from your app. Which obviously is total nonsense. The better question is probably something like "How do I generate cryptographically secure pseudo-random bytes, sort of like the function random_bytes in PHP?"
M MikeSW17 Active Member Licensed User Longtime User Oct 10, 2021 #3 The obvious starting point would be the built-in java class: https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html Beyond that others will need to help as I'm not familiar with in-line java or Library Wrapping. Upvote 0
The obvious starting point would be the built-in java class: https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html Beyond that others will need to help as I'm not familiar with in-line java or Library Wrapping.
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2021 #4 B4X: Dim sr As SecureRandom Dim b(1000) As Byte sr.GetRandomBytes(b) Encryption library. Also works in B4J and there is a similar API in B4i iEncryption library. Upvote 1
B4X: Dim sr As SecureRandom Dim b(1000) As Byte sr.GetRandomBytes(b) Encryption library. Also works in B4J and there is a similar API in B4i iEncryption library.