API Reference
Otp (CodeGlyphX)
Simple OTP helpers with fluent and static APIs.
Inheritance
- Object
- Otp
Methods
public static HotpBuilder Hotp(String issuer, String account, String secretBase32, Int64 counter, QrEasyOptions options = null) #HotpBuilderStarts a fluent HOTP builder.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- options CodeGlyphX.QrEasyOptions = null
public static String HotpHtml(String issuer, String account, String secretBase32, Int64 counter, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #StringRenders a HOTP QR as HTML from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
public static Byte[] HotpJpeg(String issuer, String account, String secretBase32, Int64 counter, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #Byte[]Renders a HOTP QR as JPEG from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
public static Byte[] HotpPng(String issuer, String account, String secretBase32, Int64 counter, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #Byte[]Renders a HOTP QR as PNG from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
public static String HotpSvg(String issuer, String account, String secretBase32, Int64 counter, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #StringRenders a HOTP QR as SVG from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
public static String HotpUri(String issuer, String account, Byte[] secret, Int64 counter, OtpAlgorithm alg = Sha1, Int32 digits = 6) #StringBuilds a HOTP URI from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
HotpUri(System.String issuer, System.String account, System.Byte[] secret, System.Int64 counter, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits) #Builds a HOTP URI from raw secret bytes.
Parameters
- issuer System.String
- account System.String
- secret System.Byte[]
- counter System.Int64
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
public static Byte[] HotpWebp(String issuer, String account, String secretBase32, Int64 counter, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #Byte[]Renders a HOTP QR as WebP from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
public static String SaveHotp(String issuer, String account, String secretBase32, Int64 counter, String path, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, String title = null) #StringSaves a HOTP QR based on file extension (.png/.webp/.svg/.html/.jpg/.bmp/.pdf/.eps). Defaults to PNG when no extension is provided.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- title System.String = null
public static Void SaveHotpHtml(String issuer, String account, String secretBase32, Int64 counter, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, String title = null) #VoidSaves a HOTP HTML to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- title System.String = null
SaveHotpHtml(System.String issuer, System.String account, System.String secretBase32, System.Int64 counter, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.String title) #Saves a HOTP HTML to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- title System.String
public static Void SaveHotpJpeg(String issuer, String account, String secretBase32, Int64 counter, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #VoidSaves a HOTP JPEG to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
SaveHotpJpeg(System.String issuer, System.String account, System.String secretBase32, System.Int64 counter, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits) #Saves a HOTP JPEG to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
public static Void SaveHotpPng(String issuer, String account, String secretBase32, Int64 counter, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #VoidSaves a HOTP PNG to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
SaveHotpPng(System.String issuer, System.String account, System.String secretBase32, System.Int64 counter, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits) #Saves a HOTP PNG to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
public static Void SaveHotpSvg(String issuer, String account, String secretBase32, Int64 counter, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #VoidSaves a HOTP SVG to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
SaveHotpSvg(System.String issuer, System.String account, System.String secretBase32, System.Int64 counter, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits) #Saves a HOTP SVG to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
public static Void SaveHotpWebp(String issuer, String account, String secretBase32, Int64 counter, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6) #VoidSaves a HOTP WebP to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
SaveHotpWebp(System.String issuer, System.String account, System.String secretBase32, System.Int64 counter, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits) #Saves a HOTP WebP to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- counter System.Int64
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
public static String SaveTotp(String issuer, String account, String secretBase32, String path, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30, String title = null) #StringSaves a TOTP QR based on file extension (.png/.webp/.svg/.html/.jpg/.bmp/.pdf/.eps). Defaults to PNG when no extension is provided.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
- title System.String = null
public static Void SaveTotpHtml(String issuer, String account, String secretBase32, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30, String title = null) #VoidSaves a TOTP HTML to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
- title System.String = null
SaveTotpHtml(System.String issuer, System.String account, System.String secretBase32, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.Int32 period, System.String title) #Saves a TOTP HTML to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- period System.Int32
- title System.String
public static Void SaveTotpJpeg(String issuer, String account, String secretBase32, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #VoidSaves a TOTP JPEG to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
SaveTotpJpeg(System.String issuer, System.String account, System.String secretBase32, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.Int32 period) #Saves a TOTP JPEG to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- period System.Int32
public static Void SaveTotpPng(String issuer, String account, String secretBase32, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #VoidSaves a TOTP PNG to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
SaveTotpPng(System.String issuer, System.String account, System.String secretBase32, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.Int32 period) #Saves a TOTP PNG to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- period System.Int32
public static Void SaveTotpSvg(String issuer, String account, String secretBase32, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #VoidSaves a TOTP SVG to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
SaveTotpSvg(System.String issuer, System.String account, System.String secretBase32, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.Int32 period) #Saves a TOTP SVG to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- period System.Int32
public static Void SaveTotpWebp(String issuer, String account, String secretBase32, Stream stream, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #VoidSaves a TOTP WebP to a file.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- path System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
SaveTotpWebp(System.String issuer, System.String account, System.String secretBase32, System.IO.Stream stream, CodeGlyphX.QrEasyOptions options, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.Int32 period) #Saves a TOTP WebP to a stream.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- stream System.IO.Stream
- options CodeGlyphX.QrEasyOptions
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- period System.Int32
public static TotpBuilder Totp(String issuer, String account, String secretBase32, QrEasyOptions options = null) #TotpBuilderStarts a fluent TOTP builder.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- options CodeGlyphX.QrEasyOptions = null
public static String TotpHtml(String issuer, String account, String secretBase32, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #StringRenders a TOTP QR as HTML from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
public static Byte[] TotpJpeg(String issuer, String account, String secretBase32, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #Byte[]Renders a TOTP QR as JPEG from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
public static Byte[] TotpPng(String issuer, String account, String secretBase32, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #Byte[]Renders a TOTP QR as PNG from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
public static String TotpSvg(String issuer, String account, String secretBase32, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #StringRenders a TOTP QR as SVG from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
public static String TotpUri(String issuer, String account, Byte[] secret, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #StringBuilds a TOTP URI from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30
TotpUri(System.String issuer, System.String account, System.Byte[] secret, CodeGlyphX.OtpAlgorithm alg, System.Int32 digits, System.Int32 period) #Builds a TOTP URI from raw secret bytes.
Parameters
- issuer System.String
- account System.String
- secret System.Byte[]
- alg CodeGlyphX.OtpAlgorithm
- digits System.Int32
- period System.Int32
public static Byte[] TotpWebp(String issuer, String account, String secretBase32, QrEasyOptions options = null, OtpAlgorithm alg = Sha1, Int32 digits = 6, Int32 period = 30) #Byte[]Renders a TOTP QR as WebP from a Base32 secret.
Parameters
- issuer System.String
- account System.String
- secretBase32 System.String
- options CodeGlyphX.QrEasyOptions = null
- alg CodeGlyphX.OtpAlgorithm = Sha1
- digits System.Int32 = 6
- period System.Int32 = 30