The Spoofchecker class
(PHP 5 >= 5.4.0, PHP 7, PECL intl >= 2.0.0)
はじめに
This class is provided because Unicode contains large number of characters and incorporates the varied writing systems of the world and their incorrect usage can expose programs or systems to possible security attacks using characters similarity.
Provided methods allow to check whether an individual string is likely an attempt at confusing the reader (spoof detection), such as "pаypаl" spelled with Cyrillic 'а' characters.
クラス概要
Spoofchecker
{
/* Constants */
/* メソッド */
}定義済み定数
Spoofchecker::ASCIISpoofchecker::HIGHLY_RESTRICTIVESpoofchecker::MODERATELY_RESTRICTIVESpoofchecker::MINIMALLY_RESTRICTIVESpoofchecker::UNRESTRICTIVESpoofchecker::SINGLE_SCRIPT_RESTRICTIVESpoofchecker::SINGLE_SCRIPT_CONFUSABLESpoofchecker::MIXED_SCRIPT_CONFUSABLESpoofchecker::WHOLE_SCRIPT_CONFUSABLESpoofchecker::ANY_CASESpoofchecker::SINGLE_SCRIPTSpoofchecker::INVISIBLESpoofchecker::CHAR_LIMIT
変更履歴
| バージョン | 説明 |
|---|---|
| 7.3.0 |
Class constants used by Spoofchecker::setRestrictionLevel() such as Spoofchecker::ASCII, Spoofchecker::HIGHLY_RESTRICTIVE, Spoofchecker::MODERATELY_RESTRICTIVE, Spoofchecker::MINIMALLY_RESTRICTIVE, Spoofchecker::UNRESTRICTIVE, Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE has been added.
|
目次
- Spoofchecker::areConfusable — Checks if given strings can be confused
- Spoofchecker::__construct — Constructor
- Spoofchecker::isSuspicious — Checks if a given text contains any suspicious characters
- Spoofchecker::setAllowedLocales — チェック時に使うロケールを設定する
- Spoofchecker::setChecks — 実行するチェックを設定する