TfaSecretKeyResult
in package
FinalYes
2段階認証の秘密鍵取得結果。
「鍵が取れた」「未登録」「復号失敗」の3状態を1つの値で表現する。 成功時のみ秘密鍵の値を保持する。
Table of Contents
Properties
- $status : TfaSecretKeyStatus
- $value : string|null
Methods
- decryptFailed() : self
- getValue() : string
- 成功時のみ秘密鍵を返す。失敗状態で呼ぶと例外。
- getValueOrNull() : string|null
- 成功なら秘密鍵、それ以外は null。
- isDecryptFailed() : bool
- isNotRegistered() : bool
- isSuccess() : bool
- notRegistered() : self
- success() : self
- __construct() : mixed
Properties
$status read-only
public
TfaSecretKeyStatus
$status
$value read-only
private
string|null
$value
Methods
decryptFailed()
public
static decryptFailed() : self
Return values
selfgetValue()
成功時のみ秘密鍵を返す。失敗状態で呼ぶと例外。
public
getValue() : string
Return values
stringgetValueOrNull()
成功なら秘密鍵、それ以外は null。
public
getValueOrNull() : string|null
Return values
string|nullisDecryptFailed()
public
isDecryptFailed() : bool
Return values
boolisNotRegistered()
public
isNotRegistered() : bool
Return values
boolisSuccess()
public
isSuccess() : bool
Return values
boolnotRegistered()
public
static notRegistered() : self
Return values
selfsuccess()
public
static success(string $value) : self
Parameters
- $value : string
Return values
self__construct()
private
__construct(TfaSecretKeyStatus $status, string|null $value) : mixed
Parameters
- $status : TfaSecretKeyStatus
- $value : string|null