Primo.TOTP 1.0.4

dotnet add package Primo.TOTP --version 1.0.4
                    
NuGet\Install-Package Primo.TOTP -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Primo.TOTP" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Primo.TOTP" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Primo.TOTP" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Primo.TOTP --version 1.0.4
                    
#r "nuget: Primo.TOTP, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Primo.TOTP@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Primo.TOTP&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Primo.TOTP&version=1.0.4
                    
Install as a Cake Tool

About

Primo.TOTP is a set of ready-to-use activities for Primo RPA Studio designed to automate generation of Time-based One-Time Passwords (TOTP) according to RFC 6238. It addresses the need to generate one-time passwords for two-factor authentication (2FA) within automation workflows. Key features include: generating TOTP codes from Base32-encoded secrets, supporting multiple hash algorithms (SHA1, SHA256, SHA512), configurable digit count and time period. The package can be added to any Primo RPA Studio project via the built-in dependency manager.

How to Use

In Primo RPA studio, create a project that will be executed by Primo RPA robot. Install this package via the ".Dependencies → Manage Dependencies" menu; the "TOTP" node with package elements will appear in Elements tree.

There is one element in the package: "Generate OTP". This element generates a time-based one-time password from a Base32-encoded secret key.

The "Generate OTP" element has the following properties:

  • Secret (required): Base32-encoded secret key
  • Result: Variable to store the generated OTP code
  • Digits: Number of digits in the OTP (default: 6)
  • Period: Time period in seconds (default: 30)
  • Algorithm: Hash algorithm - SHA1, SHA256, or SHA512 (default: SHA1)

In pure code projects use the "Generate OTP" element as follows:

//wf: [LTools.Common.Model.WorkflowData] parent
//secret: [String] Base32-encoded secret key (e.g., "TE5TPRIMOTOTPK3Y")
//resultVar: [String] Variable name to store the OTP

var totp = LTools.Common.Model.PrimoModel.Init(wf);
string otp = totp.GenerateOTP(secret, 6, 30, "SHA1");

Pure code for direct TOTP generation:

//secret - [String] Base32-encoded secret key
//digits - [Int32] Number of digits (default: 6)
//period - [Int32] Time period in seconds (default: 30)
//algorithm - [String] Hash algorithm: "SHA1", "SHA256", or "SHA512"

Primo.TOTP.Generator.Elements.WfGenerateOtp totp =
    new Primo.TOTP.Generator.Elements.WfGenerateOtp(container);
string code = WfGenerateOtp.GenerateTotp(secret, digits, period, OtpAlgorithm.SHA1);

Key Features

  • User-friendly, intuitive interface
  • High performance
  • Supports .NET 8+
  • Supports SHA1, SHA256, and SHA512 algorithms
  • Configurable digits (6 or 8) and time period

Main Types

  • Primo.TOTP.Generator.Elements.WfGenerateOtp
  • Primo.TOTP.Generator.Elements.OtpAlgorithm

Feedback

Bug reports and contributions are welcome at Primo RPA chat

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 41 3/30/2026