Windows 10 sha256 checksum

Узнать хеш сумму файла стандартными средствами командная строка

Если у вас возникла задача узнать хеш-сумму файла, а устанавливать какие-либо дополнительные программы для этого не хочется, то это можно сделать стандартными средствами с помощью командной строки.

Нам поможет утилита CertUtil по умолчанию входящая в комплект Windows

Чтобы узнать хеш сумму файла необходимо зайти в командную строку: (клавиши Win+R и набираем cmd, либо «Пуск-Все программы-Стандартные-Командная строка«)

и выполнить команду

где, c:file — путь до файла

По умолчанию утилита считает хеш-сумму с помощью SHA1

Если хотите использовать другой, пожалуйста, доступны MD5 MD4 MD2 SHA512 SHA384 SHA256 SHA1

Также можно воспользоваться утилитой FCIV (File Checksum Integrity Verifier utility) эта утилита может не входить по умолчанию в систему. Скачать можно ее с оф.сайта http://support.microsoft.com/ru-ru/kb/841290

Распаковываем и кладем файл fciv.exe для удобства в папку C:windowssystem32

Теперь можно выполнив команду

узнать хеш-сумму файла, по умолчанию MD5, но также доступен SHA1

Из полезных функций хочется отметить возможность проверить автоматом хеш-суммы всех файлов в папке, а также загрузить их в XML-файл для последующей сверки

Считаем хеш-сумму всех файлов в папке

Создаем файл d:hashes.xml, который содержит хеши и пути до файлов всех файлов папки d:Folder

fciv -add d:Folder -r -xml d:hashes.xml

Сверяем хеш суммы файлов по ранее созданному xml файлу

SHA256Managed Класс

Определение

Вычисляет хэш SHA256 для входных данных с помощью управляемой библиотеки. Computes the SHA256 hash for the input data using the managed library.

Примеры

В следующем примере вычисляется хэш SHA-256 для всех файлов в каталоге. The following example calculates the SHA-256 hash for all files in a directory.

Комментарии

Хэш используется в качестве уникального значения фиксированного размера, представляющего большой объем данных. The hash is used as a unique value of fixed size representing a large amount of data. Хэши двух наборов данных должны совпадать только в том случае, если соответствующие данные также совпадают. Hashes of two sets of data should match if and only if the corresponding data also matches. Небольшие изменения данных приводят к большим непредсказуемым изменениям в хэше. Small changes to the data result in large unpredictable changes in the hash.

Размер хеша для SHA256Managed алгоритма составляет 256 бит. The hash size for the SHA256Managed algorithm is 256 bits.

Конструкторы

Инициализирует новый экземпляр класса SHA256Managed, используя управляемую библиотеку. Initializes a new instance of the SHA256Managed class using the managed library.

Представляет размер вычисленного хэш-кода в битах. Represents the size, in bits, of the computed hash code.

(Унаследовано от HashAlgorithm) HashValue

Представляет значение вычисляемого хэш-кода. Represents the value of the computed hash code.

(Унаследовано от HashAlgorithm) State

Представляет состояние процесса вычисления хэша. Represents the state of the hash computation.

(Унаследовано от HashAlgorithm)

Свойства

Получает значение, указывающее на возможность повторного использования текущего преобразования. Gets a value indicating whether the current transform can be reused.

(Унаследовано от HashAlgorithm) CanTransformMultipleBlocks

Если переопределено в производном классе, возвращает значение, указывающее, возможно ли преобразование нескольких блоков. When overridden in a derived class, gets a value indicating whether multiple blocks can be transformed.

(Унаследовано от HashAlgorithm) Hash

Получает значение вычисленного хэш-кода. Gets the value of the computed hash code.

(Унаследовано от HashAlgorithm) HashSize

Получает размер вычисленного хэш-кода в битах. Gets the size, in bits, of the computed hash code.

(Унаследовано от HashAlgorithm) InputBlockSize

При переопределении в производном классе получает размер входного блока. When overridden in a derived class, gets the input block size.

Читайте также:  Microsoft windows чтобы предотвратить потерю данных

(Унаследовано от HashAlgorithm) OutputBlockSize

При переопределении в производном классе получает размер выходного блока. When overridden in a derived class, gets the output block size.

(Унаследовано от HashAlgorithm)

Методы

Освобождает все ресурсы, используемые классом HashAlgorithm. Releases all resources used by the HashAlgorithm class.

(Унаследовано от HashAlgorithm) ComputeHash(Byte[])

Вычисляет хэш-значение для заданного массива байтов. Computes the hash value for the specified byte array.

(Унаследовано от HashAlgorithm) ComputeHash(Byte[], Int32, Int32)

Вычисляет хэш-значение для заданной области заданного массива байтов. Computes the hash value for the specified region of the specified byte array.

(Унаследовано от HashAlgorithm) ComputeHash(Stream)

Вычисляет хэш-значение для заданного объекта Stream. Computes the hash value for the specified Stream object.

(Унаследовано от HashAlgorithm) ComputeHashAsync(Stream, CancellationToken)

Асинхронно вычисляет хэш-значение для заданного объекта Stream. Asynchronously computes the hash value for the specified Stream object.

(Унаследовано от HashAlgorithm) Dispose()

Освобождает все ресурсы, используемые текущим экземпляром класса HashAlgorithm. Releases all resources used by the current instance of the HashAlgorithm class.

(Унаследовано от HashAlgorithm) Dispose(Boolean)

Освобождает неуправляемые (а при необходимости и управляемые) ресурсы, используемые объектом SHA256Managed. Releases unmanaged resources used by the SHA256Managed object and optionally releases the managed resources.

Освобождает неуправляемые ресурсы, используемые объектом HashAlgorithm, а при необходимости освобождает также управляемые ресурсы. Releases the unmanaged resources used by the HashAlgorithm and optionally releases the managed resources.

(Унаследовано от HashAlgorithm) Equals(Object)

Определяет, равен ли указанный объект текущему объекту. Determines whether the specified object is equal to the current object.

(Унаследовано от Object) Finalize()

Освобождает ресурсы и выполняет другие операции очистки для этого объекта, прежде чем он будет освобожден в рамках сборки мусора. Frees resources and performs other cleanup operations for this object before it is reclaimed by garbage collection.

Служит хэш-функцией по умолчанию. Serves as the default hash function.

(Унаследовано от Object) GetType()

Возвращает объект Type для текущего экземпляра. Gets the Type of the current instance.

(Унаследовано от Object) HashCore(Byte[], Int32, Int32)

При переопределении в производном классе маршрутизирует данные, записанные в объект, в хэш-алгоритм SHA256 для вычисления хэша. When overridden in a derived class, routes data written to the object into the SHA256 hash algorithm for computing the hash.

При переопределении в производном классе передает данные, записанные в объект, на вход хэш-алгоритма для вычисления хэша. When overridden in a derived class, routes data written to the object into the hash algorithm for computing the hash.

(Унаследовано от HashAlgorithm) HashCore(ReadOnlySpan )

Передает записываемые в объект данные в хэш-алгоритм для вычисления хэша. Routes data written to the object into the hash algorithm for computing the hash.

Передает записываемые в объект данные в хэш-алгоритм для вычисления хэша. Routes data written to the object into the hash algorithm for computing the hash.

(Унаследовано от HashAlgorithm) HashFinal()

Если переопределено в производном классе, завершает вычисление хэша после обработки последних данных криптографическим потоковым объектом. When overridden in a derived class, finalizes the hash computation after the last data is processed by the cryptographic stream object.

Если переопределено в производном классе, завершает вычисление хэша после обработки последних данных криптографическим хэш-алгоритмом. When overridden in a derived class, finalizes the hash computation after the last data is processed by the cryptographic hash algorithm.

(Унаследовано от HashAlgorithm) Initialize()

Инициализирует экземпляр SHA256Managed. Initializes an instance of SHA256Managed.

Создает неполную копию текущего объекта Object. Creates a shallow copy of the current Object.

(Унаследовано от Object) ToString()

Возвращает строку, представляющую текущий объект. Returns a string that represents the current object.

(Унаследовано от Object) TransformBlock(Byte[], Int32, Int32, Byte[], Int32)

Вычисляет хэш-значение для заданной области входного массива байтов и копирует указанную область входного массива байтов в заданную область выходного массива байтов. Computes the hash value for the specified region of the input byte array and copies the specified region of the input byte array to the specified region of the output byte array.

Читайте также:  Названия сетевых интерфейсов linux

(Унаследовано от HashAlgorithm) TransformFinalBlock(Byte[], Int32, Int32)

Вычисляет хэш-значение для заданной области заданного массива байтов. Computes the hash value for the specified region of the specified byte array.

(Унаследовано от HashAlgorithm) TryComputeHash(ReadOnlySpan , Span , Int32)

Пытается вычислить хэш-значение для заданного массива байтов. Attempts to compute the hash value for the specified byte array.

(Унаследовано от HashAlgorithm) TryHashFinal(Span , Int32)

Пытается завершить вычисление хэша после обработки последних данных хэш-алгоритмом. Attempts to finalize the hash computation after the last data is processed by the hash algorithm.

Пытается завершить вычисление хэша после обработки последних данных хэш-алгоритмом. Attempts to finalize the hash computation after the last data is processed by the hash algorithm.

(Унаследовано от HashAlgorithm)

Явные реализации интерфейса

Освобождает неуправляемые ресурсы, используемые объектом HashAlgorithm, а при необходимости освобождает также управляемые ресурсы. Releases the unmanaged resources used by the HashAlgorithm and optionally releases the managed resources.

Обновления, обеспечивающие поддержку SHA-256 для корректной работы Dr.Web на устаревших версиях Windows

Для корректной работы Dr.Web с Windows Vista, Windows 7, Windows Server 2008 или Windows Server 2008 R2 на компьютере должны быть установлены обновления системы безопасности Microsoft, обеспечивающие поддержку SHA-256. Если при установке или обновлении Dr.Web появляется сообщение о том, что ваша операционная система не поддерживает алгоритм хеширования SHA-256, установите нужное обновление из списка ниже.

  • Для Windows Vista установите последовательно пакеты обновлений SP1 и SP2, затем установите обновление KB4090450. *
  • Для Windows 7 установите пакет обновлений SP1, затем — KB3033929 или KB4474419 или KB4054518.
  • Для Windows Server 2008 установите последовательно пакеты обновлений SP1 и SP2, затем обновление KB4474419 или KB4039648 или KB3033929.
  • Для Windows Server 2008 R2 установите пакет обновлений SP1, затем — KB4474419.

Как обновления, так и пакеты обновлений SP необходимо устанавливать в том случае, если они не были установлены ранее. Установить их можно как вручную (получив по приведенным ссылкам), так и с помощью Центра обновлений Windows.

Обновления для работы с SHA-256 могут также содержаться в других обновлениях Windows.

* Официального пакета обновлений для Windows Vista не предусмотрено, но вы можете установить пакет от Windows Server 2008.

Чтобы узнать, какая у вас установлена версия пакета обновлений (SP), воспользуйтесь инструкцией.

Чтобы узнать, какая у вас установлена версия обновлений (KB), воспользуйтесь инструкцией.

Отметим, что необходимость обновления связана с политикой компании Microsoft, которая более не позволяет сторонним центрам сертификации (DigiCert, COMODO и др.) выпускать сертификаты, которыми можно подписывать модули для работы в ядре ОС Windows. Только Microsoft может подписывать модули для ядра своим WHQL-сертификатом, который существует только в виде версии SHA256. Более подробная информация приведена в документации Microsoft.

Validating the Files

Errors can occur during the download of CentOS ISOs, even if your download manager reports none. Therefore it is very important to check that the files have not been corrupted in any way. This is the purpose of the CHECKSUM files (md5sum.txt.asc, sha1sum.txt.asc, sha256sum.txt.asc) we include in the iso directory. They contain one line for each of the available ISO files with a content verification code, called a hash, computed from the original ISO files.

We include 3 files (md5sum.txt, sha1sum.txt, sha256sum.txt) and their gpg clear-signed copies (md5sum.txt.asc, sha1sum.txt.asc, sha256sum.txt.asc) copies that contain the hashes for different tools. We recommend that you use the sha256.txt.asc values if you can find an sha256sum tool for your environment.

If you wish to verify the clear text signature of the signed (.asc) files, see these detailed instructions

Читайте также:  Английский приложение для windows

Checksum information is also listed via https in the Release Notes for each release and in the archived release announcement.

On Linux

Go to the directory where you downloaded the ISO in a command prompt and type:

Where is the specific ISO you downloaded. For example in CentOS 6.5, for the minimal iso, it would be:

You would compare the hash received, in this case f9d84907d77df62017944cb23cab66305e94ee6ae6c1126415b81cc5e999bdd0, with the value in the file sha256sum.txt.asc. If it matches for CentOS-6.5-x86_64-minimal.iso, your iso download is good.

On Microsoft Windows GUI

There are a number of no-cost products available for file validation and hashing that have point and click interfaces. Here are links to a few of them:

Follow the instructions provided to install the program. When you run the program, use the file selection tools provided to select your downloaded ISO image files. Then select the SHA256 algorithm for calculation, and run the tool. The program takes some time to complete, since it must read the entire ISO file.

If you are using HashTab, you will need to enable the SHA256 checksum option. In order to do this open the File Properties window (right click —> File Hashes tab —> Settings), then select the SHA256 option. It is advisable to uncheck any preselected hash options as they will only slow down the hash calculations.

Open the file sha256sum.txt.asc with a text editor, such as Notepad, to display its contents. Make sure the hash displayed by the hash tool for each of the downloaded ISO files exactly matches the corresponding hash in the sha256sum.txt.asc file. If the tool does only sha1sum or md5sum, then you can use those files (sha1sum.txt.asc, md5sum.txt.asc) in our ISO directory for the compare.

If all of the hashes match, you can burn the ISO file to disc. If a file does not match, download it again.

On Microsoft Windows Command Prompt

To check the files using the command prompt, download the program sha256sum.exe. If you have any problems accessing sha256sum.exe, you can try to grab md5sum.exe. If you have downloaded md5sum.exe be sure to substitute for the correct tool below.

The sha256sum.exe program computes and displays hashes. To use it, save sha256sum.exe to the same directory as the ISO files. Select Run. from the Start menu and then enter cmd for the name of the program to start a Command Prompt window. Then change into the download directory. Run sha256sum with each ISO file like this:

The program takes some time to complete, since it must read the entire ISO file.

Open the file sha256sum.txt.asc with a text editor, such as Notepad, to display its contents. Make sure the hash displayed by sha256sum.exe for each of the downloaded ISO files exactly matches the corresponding hash.

If all of the hashes match, you can burn the ISO file to disc. If a file does not match, download it again.

Also, this for Windows power shell:

On Mac OS X

To check the files, download the program HashTab. Drag each CentOS image file that you want to validate, and drop it onto HashTab. Take note of the SHA256 value that HashTab displays.

Open the file sha256sum.txt.asc with a text editor, such as TextEdit, to display its contents. Make sure the hash displayed by HashTab for each of the downloaded ISO files exactly matches the corresponding hash in the sha256sum.txt.asc file.

To validate the files from the command line, use the shasum command. In order to correctly validate the files, the 256-bit algorithm must be specified. Change into the directory that holds the ISO image files, then run shasum. For example:

If all of the hashes match, you can burn the ISO file to disc. If a file does not match, download it again.

TipsAndTricks/sha256sum (последним исправлял пользователь анонимно 2019-12-09 09:11:36)

Оцените статью