OTP.generateTOTPCode(String secret, int currentTime, {int length: 6, int interval: 30, Algorithm algorithm: Algorithm.SHA1, bool isGoogle: false})
OTP.generateTOTPCodeString(String secret, int currentTime, {int length: 6, int interval: 30, Algorithm algorithm: Algorithm.SHA1, bool isGoogle: false})
/// Optional parameters to change the length of the code provided (default 6), interval (default 30), and hashing algorithm (default SHA1)
/// These settings are defaulted to the RFC standard but can be changed.
But actually it is SHA256:
static int generateTOTPCode(String secret, int time,
{int length = 6, int interval = 30, Algorithm algorithm = Algorithm.SHA256, bool isGoogle = false}) {
static int generateTOTPCodeString(String secret, int time,
{int length = 6, int interval = 30, Algorithm algorithm = Algorithm.SHA256, bool isGoogle = false}) {
In readme and code's comment it is
But actually it is SHA256: