CodeGlyphX logo
CodeGlyphX

API Reference

Class

TotpBuilder

Namespace CodeGlyphX.Otp
Assembly CodeGlyphX
Modifiers sealed

Fluent TOTP builder.

Inheritance

  • Object
  • TotpBuilder

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by

Methods

public QrCode Encode() #
Returns: QrCode

Encodes the QR code.

public RenderedOutput Render(OutputFormat format, RenderExtras extras = null) #
Returns: RenderedOutput

Renders the configured TOTP QR code to the requested output format.

Parameters

format CodeGlyphX.Rendering.OutputFormat requiredposition: 0
extras CodeGlyphX.Rendering.RenderExtras = null optionalposition: 1
Save 2 overloads
public String Save(String path, RenderExtras extras = null) #
Returns: String

Saves the configured TOTP QR code, selecting the output format from the file extension.

Parameters

path System.String requiredposition: 0
extras CodeGlyphX.Rendering.RenderExtras = null optionalposition: 1
public Void Save(Stream stream, OutputFormat format, RenderExtras extras = null) #
Returns: Void

Writes the configured TOTP QR code to a stream in the requested output format.

Parameters

stream System.IO.Stream requiredposition: 0
format CodeGlyphX.Rendering.OutputFormat requiredposition: 1
extras CodeGlyphX.Rendering.RenderExtras = null optionalposition: 2
public String Uri() #
Returns: String

Builds the otpauth URI.

public TotpBuilder WithOptions(Action<QrEasyOptions> configure) #
Returns: TotpBuilder

Updates rendering options.

Parameters

configure System.Action{CodeGlyphX.QrEasyOptions} requiredposition: 0
public TotpBuilder WithParameters(OtpAlgorithm algorithm, Int32 digits, Int32 period) #
Returns: TotpBuilder

Sets algorithm, digits, and period.

Parameters

algorithm CodeGlyphX.OtpAlgorithm requiredposition: 0
digits System.Int32 requiredposition: 1
period System.Int32 requiredposition: 2

Properties

public QrEasyOptions Options { get; } #

Rendering options used by this builder.

public OtpAlgorithm Algorithm { get; set; } #

OTP algorithm.

public Int32 Digits { get; set; } #

OTP digits.

public Int32 Period { get; set; } #

TOTP period in seconds.