public static function decrypt($cyphertext, $password, $cost = 0)
{
// Find the IV at the beginning of the cypher text
$iv = Str::substr($cyphertext, 0, self::IVSIZE);
// Gather the checksum portion of the cypher text
$chksum = Str::substr($cyphertext, self::IVSIZE, self::CKSIZE);
// Gather message portion of cyphertext after iv and checksum
$message = Str::substr($cyphertext, self::IVSIZE + self::CKSIZE);
// Derive key from password
$key = self::key($password, $iv, $cost, self::RIJNDA, self::mode());
// Calculate verification checksum
$verify = self::checksum($message, $iv, $key, self::RIJNDA, self::mode());
// Verify HMAC before decrypting
self::checksumVerify($verify, $chksum);
// Decrypt message and return
return \openssl_decrypt($message, static::CIPHER, $key, 1, $iv);
}