src/Util/Crypto.php
public static function encryptWithPassword(
        string $plaintext,
        string $password,
        string $ad = '',
        string $format = null
    ): string {
        return self::encrypt($plaintext, $password, $ad, $format, true);
    }
public static function encryptWithPassword(
        string $plaintext,
        string $password,
        string $ad = '',
        string $format = null
    ): string {
        return self::encrypt($plaintext, $password, $ad, $format, true);
    }
public static function encryptWithPassword ( string $ plaintext , string $ password , string $ ad = '' , string $ format = null ) : string { return self :: encrypt ( $ plaintext , $ password , $ ad , $ format , true ) ; }
Encrypts a string with a password, using a slow key derivation function
to make password cracking more expensive.

@param string $plaintext
@param string $password
@param string $ad
@param string $format

@throws \Exception

@return string
Encrypts a string with a password using a slow key derivation function to make password cracking more expensive .