e-CryptIt Engine Xojo Plugin

Einhugur_2FA_TOTP.GenerateQRCodeContent Method

Generates content for QRCode from given secret key. This variation will generate the standard most compatible setup.

shared GenerateQRCodeContent(
   secretKey as String,
   label as String) as String

Parameters

secretKey
The secret key.

Secret keys are represented in various of ways and the plugin will preprocess them correctly to take all representations.

For example then all of the following keys are equal:
N7P7TWR3Q5WUA2XG
N7P7 TWR3 Q5WU A2XG
n7P7 tWR3 q5WU a2XG
label
Label which identifies the key for the authenticator apps.

At least for Microsoft authenticator app then its good to format this string like. “Facebook:bjorn”

Then in the authenticator apps you get Facebook listed as main and bjorn as line bellow indicating account name.

Returns

String
Content to put in QRCode.

Remarks

You can use the Einhugur BarcodePlugin to generate the actual QR code which contains the content returned by this function.


This function can throw InvalidArgumentException.


Some authentication apps only support the standard implementation while more advanced apps support customised setup.

See Also

Einhugur_2FA_TOTP Class