diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-05 23:17:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-05 23:17:40 +0700 |
commit | f5c5119255ce14081009a3dc9ccc1427c78f47a3 (patch) | |
tree | 2afd90b47aee6697b359c9e066f1e2dbfea8f678 /crypto/src/tls/AbstractTlsContext.cs | |
parent | Use generics in Enums (diff) | |
download | BouncyCastle.NET-ed25519-f5c5119255ce14081009a3dc9ccc1427c78f47a3.tar.xz |
Remove Times class
Diffstat (limited to 'crypto/src/tls/AbstractTlsContext.cs')
-rw-r--r-- | crypto/src/tls/AbstractTlsContext.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/tls/AbstractTlsContext.cs b/crypto/src/tls/AbstractTlsContext.cs index a5ac85962..40a8e8f75 100644 --- a/crypto/src/tls/AbstractTlsContext.cs +++ b/crypto/src/tls/AbstractTlsContext.cs @@ -11,7 +11,7 @@ namespace Org.BouncyCastle.Tls internal abstract class AbstractTlsContext : TlsContext { - private static long counter = Times.NanoTime(); + private static long counter = DateTime.UtcNow.Ticks; private static long NextCounterValue() { @@ -22,7 +22,7 @@ namespace Org.BouncyCastle.Tls { byte[] additionalSeedMaterial = new byte[16]; Pack.UInt64_To_BE((ulong)NextCounterValue(), additionalSeedMaterial, 0); - Pack.UInt64_To_BE((ulong)Times.NanoTime(), additionalSeedMaterial, 8); + Pack.UInt64_To_BE((ulong)DateTime.UtcNow.Ticks, additionalSeedMaterial, 8); additionalSeedMaterial[0] &= 0x7F; additionalSeedMaterial[0] |= (byte)(connectionEnd << 7); |