TotpSecret
final class TotpSecret (View source)
Holds a canonical, minimum-strength Base32 TOTP secret without implicit string conversion.
Constants
| MINIMUM_BYTES |
|
Methods
Imports a formatted Base32 secret and canonicalizes it after enforcing the enrollment minimum.
Exports the secret only through an explicit canonical Base32 operation for trusted consumers.
Redacts secret material from PHP debug dumps.
Refuses PHP serialization so secret material cannot be exported through object serialization.
Refuses PHP unserialization because serialized TOTP secrets are never accepted by this contract.
Details
fromBase32
static TotpSecret
fromBase32(string $value)
Imports a formatted Base32 secret and canonicalizes it after enforcing the enrollment minimum.
toBase32
string
toBase32()
Exports the secret only through an explicit canonical Base32 operation for trusted consumers.
__debugInfo
array
__debugInfo()
Redacts secret material from PHP debug dumps.
__serialize
array
__serialize()
Refuses PHP serialization so secret material cannot be exported through object serialization.
__unserialize
void
__unserialize(array $data)
Refuses PHP unserialization because serialized TOTP secrets are never accepted by this contract.