CodeGlyphX logo
CodeGlyphX

API Reference

Class

HotpBuilder

Namespace CodeGlyphX.Otp
Assembly CodeGlyphX
Modifiers sealed

Fluent HOTP builder.

Inheritance

  • Object
  • HotpBuilder

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 String Html() #
Returns: String

Renders HTML text.

public Byte[] Jpeg() #
Returns: Byte[]

Renders JPEG bytes.

public Byte[] Png() #
Returns: Byte[]

Renders PNG bytes.

public String Save(String path, String title = null) #
Returns: String

Saves based on file extension (.png/.webp/.svg/.html/.jpg). Defaults to PNG when no extension is provided.

Parameters

path System.String requiredposition: 0
title System.String = null optionalposition: 1
SaveHtml 2 overloads
public Void SaveHtml(Stream stream, String title = null) #
Returns: Void

Saves HTML to a file.

Parameters

path System.String requiredposition: 0
title System.String = null optionalposition: 1
SaveHtml(System.IO.Stream stream, System.String title) #

Saves HTML to a stream.

Parameters

stream System.IO.Stream required
title System.String required
SaveJpeg 2 overloads
public Void SaveJpeg(Stream stream) #
Returns: Void

Saves JPEG to a file.

Parameters

path System.String requiredposition: 0
SaveJpeg(System.IO.Stream stream) #

Saves JPEG to a stream.

Parameters

stream System.IO.Stream required
SavePng 2 overloads
public Void SavePng(Stream stream) #
Returns: Void

Saves PNG to a file.

Parameters

path System.String requiredposition: 0
SavePng(System.IO.Stream stream) #

Saves PNG to a stream.

Parameters

stream System.IO.Stream required
SaveSvg 2 overloads
public Void SaveSvg(Stream stream) #
Returns: Void

Saves SVG to a file.

Parameters

path System.String requiredposition: 0
SaveSvg(System.IO.Stream stream) #

Saves SVG to a stream.

Parameters

stream System.IO.Stream required
SaveWebp 2 overloads
public Void SaveWebp(Stream stream) #
Returns: Void

Saves WebP to a file.

Parameters

path System.String requiredposition: 0
SaveWebp(System.IO.Stream stream) #

Saves WebP to a stream.

Parameters

stream System.IO.Stream required
public String Svg() #
Returns: String

Renders SVG text.

public String Uri() #
Returns: String

Builds the otpauth URI.

public Byte[] Webp() #
Returns: Byte[]

Renders WebP bytes.

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

Updates rendering options.

Parameters

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

Sets algorithm and digits.

Parameters

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

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 Int64 Counter { get; set; } #

HOTP counter.