Skip to content

Commit 0faa48a

Browse files
committed
refactor: 更新默认值
1 parent 6390be7 commit 0faa48a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/BootstrapBlazor.Authenticator/BootstrapBlazor.Authenticator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
14+
<PackageReference Include="BootstrapBlazor" Version="9.5.11" />
1515
<PackageReference Include="Otp.NET" Version="1.4.0" />
1616
</ItemGroup>
1717

src/components/BootstrapBlazor.Authenticator/Services/DefaultTotpService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public string GenerateOtpUri(OtpOptions? options = null)
2121
return uri.ToString();
2222
}
2323

24-
public string Compute(string secretKey, int step = 6, OtpHashMode mode = OtpHashMode.Sha1, int totpSize = 6, DateTime? timestamp = null)
24+
public string Compute(string secretKey, int period = 30, OtpHashMode mode = OtpHashMode.Sha1, int digits = 6, DateTime? timestamp = null)
2525
{
26-
var instance = new Totp(Base32Encoding.ToBytes(secretKey), step, mode.ToMode(), totpSize, timeCorrection: null);
26+
var instance = new Totp(Base32Encoding.ToBytes(secretKey), period, mode.ToMode(), digits, timeCorrection: null);
2727
Instance = new DefaultTotpInstance(instance);
2828
return timestamp == null ? instance.ComputeTotp() : instance.ComputeTotp(timestamp.Value);
2929
}

0 commit comments

Comments
 (0)