diff options
Diffstat (limited to 'crypto/src/bcpg/sig/SignatureCreationTime.cs')
-rw-r--r-- | crypto/src/bcpg/sig/SignatureCreationTime.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/bcpg/sig/SignatureCreationTime.cs b/crypto/src/bcpg/sig/SignatureCreationTime.cs index 233dd18e6..87e41a43c 100644 --- a/crypto/src/bcpg/sig/SignatureCreationTime.cs +++ b/crypto/src/bcpg/sig/SignatureCreationTime.cs @@ -1,6 +1,5 @@ using System; -using Org.BouncyCastle.Crypto.Utilities; using Org.BouncyCastle.Utilities.Date; namespace Org.BouncyCastle.Bcpg.Sig @@ -11,10 +10,11 @@ namespace Org.BouncyCastle.Bcpg.Sig public class SignatureCreationTime : SignatureSubpacket { - protected static byte[] TimeToBytes(DateTime time) + [Obsolete("Will be removed")] + protected static byte[] TimeToBytes(DateTime time) { long t = DateTimeUtilities.DateTimeToUnixMs(time) / 1000L; - return Pack.UInt32_To_BE((uint)t); + return Utilities.TimeToBytes((uint)t); } public SignatureCreationTime(bool critical, bool isLongLength, byte[] data) @@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Bcpg.Sig public DateTime GetTime() { - uint time = Pack.BE_To_UInt32(data, 0); + long time = Utilities.TimeFromBytes(data); return DateTimeUtilities.UnixMsToDateTime(time * 1000L); } } |