From f47fcc7aa1820a0d137c76fd1433f85e8b126ebc Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 24 Jun 2018 21:35:04 +0100 Subject: [PATCH 1/2] Move to development version 4.5.99.1663. --- DiscImageChef.Checksums.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscImageChef.Checksums.csproj b/DiscImageChef.Checksums.csproj index 4ead9ace5..c5379e503 100644 --- a/DiscImageChef.Checksums.csproj +++ b/DiscImageChef.Checksums.csproj @@ -12,7 +12,7 @@ false net461 true - 4.5.0.1663 + 4.5.99.1663 Claunia.com Copyright © 2011-2018 Natalia Portillo The Disc Image Chef From 1766bd6fc64dc04a3f42d5dc2d2229d406fb51cc Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 25 Jun 2018 19:08:16 +0100 Subject: [PATCH 2/2] Move all interfaces, extents, interop and metadata to DiscImageChef.CommonTypes. --- Adler32Context.cs | 1 + CRC16Context.cs | 1 + CRC32Context.cs | 1 + CRC64Context.cs | 1 + DiscImageChef.Checksums.csproj | 2 +- FletcherContext.cs | 1 + IChecksum.cs | 60 ---------------------------------- MD5Context.cs | 1 + RIPEMD160Context.cs | 1 + SHA1Context.cs | 1 + SHA256Context.cs | 1 + SHA384Context.cs | 1 + SHA512Context.cs | 1 + SpamSumContext.cs | 1 + 14 files changed, 13 insertions(+), 61 deletions(-) delete mode 100644 IChecksum.cs diff --git a/Adler32Context.cs b/Adler32Context.cs index 0e58f602c..e46a491a1 100644 --- a/Adler32Context.cs +++ b/Adler32Context.cs @@ -33,6 +33,7 @@ using System; using System.IO; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/CRC16Context.cs b/CRC16Context.cs index 858e03eb9..7eacbe941 100644 --- a/CRC16Context.cs +++ b/CRC16Context.cs @@ -33,6 +33,7 @@ using System; using System.IO; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/CRC32Context.cs b/CRC32Context.cs index 8bf6157f3..6caab3f64 100644 --- a/CRC32Context.cs +++ b/CRC32Context.cs @@ -33,6 +33,7 @@ using System; using System.IO; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/CRC64Context.cs b/CRC64Context.cs index 15b73a5f5..3dcd379b8 100644 --- a/CRC64Context.cs +++ b/CRC64Context.cs @@ -33,6 +33,7 @@ using System; using System.IO; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/DiscImageChef.Checksums.csproj b/DiscImageChef.Checksums.csproj index c5379e503..ee02b45eb 100644 --- a/DiscImageChef.Checksums.csproj +++ b/DiscImageChef.Checksums.csproj @@ -46,7 +46,6 @@ - @@ -63,6 +62,7 @@ + {F8BDF57B-1571-4CD0-84B3-B422088D359A} DiscImageChef.Helpers diff --git a/FletcherContext.cs b/FletcherContext.cs index d89477829..1366a1e23 100644 --- a/FletcherContext.cs +++ b/FletcherContext.cs @@ -35,6 +35,7 @@ using System; using System.IO; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/IChecksum.cs b/IChecksum.cs deleted file mode 100644 index 862bbd89f..000000000 --- a/IChecksum.cs +++ /dev/null @@ -1,60 +0,0 @@ -// /*************************************************************************** -// The Disc Image Chef -// ---------------------------------------------------------------------------- -// -// Filename : IChecksum.cs -// Author(s) : Natalia Portillo -// -// Component : Checksums. -// -// --[ Description ] ---------------------------------------------------------- -// -// Provides an interface for implementing checksums and hashes. -// -// --[ License ] -------------------------------------------------------------- -// -// This library is free software; you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 2.1 of the -// License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, see . -// -// ---------------------------------------------------------------------------- -// Copyright © 2011-2018 Natalia Portillo -// ****************************************************************************/ - -namespace DiscImageChef.Checksums -{ - public interface IChecksum - { - /// - /// Updates the hash with data. - /// - /// Data buffer. - /// Length of buffer to hash. - void Update(byte[] data, uint len); - - /// - /// Updates the hash with data. - /// - /// Data buffer. - void Update(byte[] data); - - /// - /// Returns a byte array of the hash value. - /// - byte[] Final(); - - /// - /// Returns a hexadecimal representation of the hash value. - /// - string End(); - } -} \ No newline at end of file diff --git a/MD5Context.cs b/MD5Context.cs index ca48fa3d7..2f1b3ac60 100644 --- a/MD5Context.cs +++ b/MD5Context.cs @@ -33,6 +33,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/RIPEMD160Context.cs b/RIPEMD160Context.cs index 55d668228..a77300dab 100644 --- a/RIPEMD160Context.cs +++ b/RIPEMD160Context.cs @@ -33,6 +33,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/SHA1Context.cs b/SHA1Context.cs index f56d0d7cc..d9c363469 100644 --- a/SHA1Context.cs +++ b/SHA1Context.cs @@ -33,6 +33,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/SHA256Context.cs b/SHA256Context.cs index dc2d3e0ae..001784432 100644 --- a/SHA256Context.cs +++ b/SHA256Context.cs @@ -33,6 +33,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/SHA384Context.cs b/SHA384Context.cs index b3b75c6a3..36b1e5b8a 100644 --- a/SHA384Context.cs +++ b/SHA384Context.cs @@ -33,6 +33,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/SHA512Context.cs b/SHA512Context.cs index 3769a7977..1dafecdd4 100644 --- a/SHA512Context.cs +++ b/SHA512Context.cs @@ -33,6 +33,7 @@ using System.IO; using System.Security.Cryptography; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums { diff --git a/SpamSumContext.cs b/SpamSumContext.cs index c38cc2318..6fea5add2 100644 --- a/SpamSumContext.cs +++ b/SpamSumContext.cs @@ -41,6 +41,7 @@ using System; using System.Text; +using DiscImageChef.CommonTypes.Interfaces; namespace DiscImageChef.Checksums {