« ResourceBundle::getLocales
Spoofchecker::areConfusable »

Spoofchecker クラス

(PHP 5 >= 5.4.0, PHP 7, PHP 8, PECL intl >= 2.0.0)

はじめに

Unicode は非常にたくさんの文字と、 世界中の様々な表記体系を含んでいます。 そのため使い方を誤ると、 文字の類似性を利用して、 プログラムやシステムに対するセキュリティ攻撃が成立する可能性があります。 そのため、このクラスが提供されています。

このクラスのメソッドを使うと、 個別の文字列が、文字の読み手を混乱させようとしている可能性があるかをチェック(spoof detection)できます。 たとえば、キリル文字の 'а' が混じった "pаypаl" のような文字列のようなものをチェックできます。

クラス概要

class Spoofchecker {
/* 定数 */
public const int ANY_CASE;
public const int SINGLE_SCRIPT;
public const int INVISIBLE;
public const int CHAR_LIMIT;
public const int ASCII;
public const int HIGHLY_RESTRICTIVE;
public const int UNRESTRICTIVE;
public const int MIXED_NUMBERS;
public const int HIDDEN_OVERLAY;
public const int IGNORE_SPACE;
public const int CASE_INSENSITIVE;
public const int ADD_CASE_MAPPINGS;
/* メソッド */
public function __construct()
public function areConfusable(string $string1, string $string2, int &$errorCode = null): bool
public function isSuspicious(string $string, int &$errorCode = null): bool
public function setAllowedChars(string $pattern, int $patternOptions = 0): void
public function setAllowedLocales(string $locales): void
public function setChecks(int $checks): void
public function setRestrictionLevel(int $level): void
}

定義済み定数

Spoofchecker::SINGLE_SCRIPT_CONFUSABLE int

Spoofchecker::MIXED_SCRIPT_CONFUSABLE int

Spoofchecker::WHOLE_SCRIPT_CONFUSABLE int

Spoofchecker::ANY_CASE int

Spoofchecker::SINGLE_SCRIPT int

Spoofchecker::INVISIBLE int

Spoofchecker::CHAR_LIMIT int

Spoofchecker::ASCII int

Spoofchecker::HIGHLY_RESTRICTIVE int

Spoofchecker::MODERATELY_RESTRICTIVE int

Spoofchecker::MINIMALLY_RESTRICTIVE int

Spoofchecker::UNRESTRICTIVE int

Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE int

Spoofchecker::MIXED_NUMBERS int

Spoofchecker::HIDDEN_OVERLAY int

Spoofchecker::IGNORE_SPACE int

Spoofchecker::CASE_INSENSITIVE int

大文字小文字を区別しないマッチングを有効にします

Spoofchecker::ADD_CASE_MAPPINGS int

セット内の各要素に対して、すべての大文字小文字のマッピングを追加します

Spoofchecker::SIMPLE_CASE_INSENSITIVE int

大文字小文字を区別しないマッチングを有効にします

目次

関連キーワード:
Spoofchecker   定数   areConfusable   setRestrictionLevel   大文字   intl   混乱   construct   errorCode   isSuspicious   setAllowedChars   setAllowedLocales   setChecks   区別   マッチング   ResourceBundle   getLocales   Unicode   表記   セキュリティ   攻撃   成立   個別   spoof   キリル
関連する関数・ページ:
spoofchecker.setchecks   spoofchecker.setrestrictionlevel   spoofchecker.construct   spoofchecker.setallowedlocales   spoofchecker.areconfusable   spoofchecker.issuspicious

他のマニュアルの関連ページ