PHP code example of horde / stringprep
1. Go to this page and download the library: Download horde/stringprep library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
horde / stringprep example snippets
use Horde\Stringprep\SaslPrepProfile;
use Horde\Stringprep\OpaqueStringProfile;
use Horde\Stringprep\ProfileInterface;
// Legacy stringprep
$saslprep = new SaslPrepProfile();
$username = $saslprep->apply($input, ProfileInterface::MODE_QUERY);
// Modern PRECIS
$opaque = new OpaqueStringProfile();
$password = $opaque->apply($input, ProfileInterface::MODE_STORE);