One Logo Pool Ball
AuthenticationServices · IOS API REFERENCE

ASImportableCredential.TOTP

struct · iOS 26.0+ · SDK 27.1

struct TOTP

A representation of TOTP as defined in the [Credential Exchange Format (CXF) specs] This represents a TOTP code generator.

Members (13)

get · iOS 26.0+

digits

TypeScript
get digits(): number
Swift declaration
var digits: UInt16

The number of digits in the code used by the generator.

set · iOS 26.0+

digits

TypeScript
set digits(value: number)
Swift declaration
var digits: UInt16

The number of digits in the code used by the generator.

get · iOS 26.0+

issuer

TypeScript
get issuer(): (string) | null
Swift declaration
var issuer: String?

Optional: The issuer of the generator.

set · iOS 26.0+

issuer

TypeScript
set issuer(value: (string) | null)
Swift declaration
var issuer: String?

Optional: The issuer of the generator.

get · iOS 26.0+

period

TypeScript
get period(): number
Swift declaration
var period: UInt16

The period, in seconds, used by the generator to refresh codes.

set · iOS 26.0+

period

TypeScript
set period(value: number)
Swift declaration
var period: UInt16

The period, in seconds, used by the generator to refresh codes.

get · iOS 26.0+

secret

TypeScript
get secret(): ArrayBuffer
Swift declaration
var secret: Data

The secret associated with this generator. Must be Base32 encoded when encoded to JSON.

set · iOS 26.0+

secret

TypeScript
set secret(value: ArrayBuffer)
Swift declaration
var secret: Data

The secret associated with this generator. Must be Base32 encoded when encoded to JSON.

init · iOS 26.0+

init

TypeScript
static init(secret: ArrayBuffer, period: number, digits: number, userName: (string) | null, algorithm: ASImportableCredential_TOTP_Algorithm, issuer?: (string) | null): ASImportableCredential_TOTP
Swift declaration
init(secret: Data, period: UInt16, digits: UInt16, userName: String?, algorithm: ASImportableCredential.TOTP.Algorithm, issuer: String? = nil)
get · iOS 26.0+

userName

TypeScript
get userName(): (string) | null
Swift declaration
var userName: String?

The user name associated with the generator. When instantiating from JSON, this property will be populated from the "username" field.

set · iOS 26.0+

userName

TypeScript
set userName(value: (string) | null)
Swift declaration
var userName: String?

The user name associated with the generator. When instantiating from JSON, this property will be populated from the "username" field.

get · iOS 26.0+

algorithm

TypeScript
get algorithm(): ASImportableCredential_TOTP_Algorithm
Swift declaration
var algorithm: ASImportableCredential.TOTP.Algorithm

The algorithm used by the generator. Must be one of "sha1", "sha256", or "sha512".

set · iOS 26.0+

algorithm

TypeScript
set algorithm(value: ASImportableCredential_TOTP_Algorithm)
Swift declaration
var algorithm: ASImportableCredential.TOTP.Algorithm

The algorithm used by the generator. Must be one of "sha1", "sha256", or "sha512".

Skipped declarations

No declarations were skipped in this snapshot.

All AuthenticationServices types →