Все вопросы: [checksum]
66 вопросов
Проверка дубликатов файлов без сохранения их контрольных сумм
Например, у вас есть приложение, которое обрабатывает файлы, отправленные разными клиентами. Клиенты отправляют тонны файлов каждый день, и вы загружаете содержимое этих файлов в свою систему. Файлы имеют одинаковый формат. Единственное ограничение, которое вам дают, - вам не разрешается запуска...
Bit shifting in internet checksums
This is almost certainly a very silly question, but for some reason I'm having trouble with internet checksum calculations. All of the algorithms basically look something like this: WORD chksm(WORD *startpos, WORD checklen){ ulong sum = 0; WORD answer = 0; while (checklen > 1) { sum += ...
Calculate Hash or Checksum for a table in SQL Server
I'm trying to compute a checksum or a hash for an entire table in SQL Server 2008. The problem I'm running into is that the table contains an XML column datatype, which cannot be used by checksum and has to be converted to nvarchar first. So I need to break it down into two problems: calculate ...
Is there any metadata associated with word document?
I am trying to generate check sum of a word document by opening at binary level. I generate the check sum of the document. Copy the document to a different location. When I generate the checksum at the new location I get a different value though I haven't changed the contents of the document. The...
Why is the calculated checksum not matching the BCC sent over the serial port?
I've got a little application written in C# that listens on a SerialPort for information to come in. The information comes in as: STX + data + ETX + BCC. We then calculate the BCC of the transmission packet and compare. The function is: private bool ConsistencyCheck(byte[] buffer) { byte ...
How do I calculate a REBOL 3 module checksum?
It's possible in REBOL 3 to calculate a SHA1 module checksum. When REBOL loads a module, it compares its checksum against the checksum of the loaded module, and if the two do not match, an error is generated, viz. access error: invalid checksum (tampered file). No matter how I try, I can't seem ...
Cumulative Hashes
I've read before here on SO (EDIT: Incremental Checksums) that there are some checksum algorithms (I think one of those is adler32) that support the following property: adler32('abc'); // 123 adler32('def'); // 456 adler32('abcdef'); // 579 (123 + 456) Please note that the results are only exa...
UDP checksum calculation
The UDP header struct defined at /usr/include/netinet/udp.h is as follows struct udphdr { u_int16_t source; u_int16_t dest; u_int16_t len; u_int16_t check; }; What value is stored in the check field of the header? How to verify if the checksum is correct? I meant on what data is the ch...
Generating Luhn Checksums
There are lots of implementations for validating Luhn checksums but very few for generating them. I've come across this one however in my tests it has revealed to be buggy and I don't understand the logic behind the delta variable. I've made this function that supposedly should generated Luhn ch...
Still need checksum in application protocol when tcp/ip already has it?
I am designing an application protocol, and i am wondering if i still need include checksum in the protocol since tcp/ip already has checksum. what's your opinion?
Image file cheksum as a unique content compare optimalisation
Users are uploading fotos to our php build system. Some of them we are marking as forbidden because of not relevant content. I´m searching for optimalisation of an 'AUTO-COMPARE' algorithm which is skipping these marked as forbidden fotos. Every upload need to be compared to many vorbinden. Poss...
How can I tell if two image files are the same in Perl?
I have a Perl script I wrote for my own personal use that fetches image files from a website periodically. It then saves these images to a folder. These image files are quite often the same from fetch to fetch, and I'd like to not save duplicates if I can get around it. My question: What would...
Error Detection Effiency (CRC, Checksum, etc)
I have a hypothetical situation of sending data units, each of a thousand bytes. Failure rate is rare but when a error does occur it is less likely to be a single bit error and more likely to be an error in a few bits in a row. At first I thought of using a checksum, but apparently that can miss...
enough using checksum
How would you do that? You are sending files which contains many lines.Every line is a record from database. All files are zipped toggether into one file. Is it enough to send a checksum with this file to ensure that other side received all records and none has disappear?
SQL table self-reference query vs. unique constraints using checksum
I would like to better understand the differences for checking uniqueness in a record before an INSERT between using CHECKSUM (with unique constraints) versus self-referencing table statement like the one below. What scenarios would pose one option to be the best choice over the other, and for wh...
Should I use CRC-16 or IP checksum (RFC1071) for an embedded application?
I'm writing an embedded application on an ARM7 processor and I need some form of checksum for data that I'm sending over a serial link as well for data that I'm storing in the flash. I was wondering which of the two CRCs would be better suited for the purpose. The main trade-off are code speed v...
Best way to generate order numbers for an online store?
Every order in my online store has a user-facing order number. I'm wondering the best way to generate them. Criteria include: Short Easy to say over the phone (e.g., "m" and "n" are ambiguous) Unique Checksum (overkill? Useful?) Edit: Doesn't reveal how many total orders there have been (a cus...
What is the fastest way to create a checksum for large files in C#
I have to sync large files across some machines. The files can be up to 6GB in size. The sync will be done manually every few weeks. I cant take the filename into consideration because they can change anytime. My plan is to create checksums on the destination PC and on the source PC and then co...
Incremental Checksums
I am looking for a checksum algorithm where for a large block of data the checksum is equal to the sum of checksums from all the smaller component blocks. Most of what I have found is from RFCs 1624/1141 which do provide this functionality. Does anyone have any experience with these checksumming ...
EAN 8 : How to calculate checksum digit?
I need to create EAN 8 bar code programmatically. I search an algorithm to calculate the checksum digit.
Checksum for multipage tiff document
I want to calculate the checksum for a large tiff file that might not fit in memory. Will I get a reliable value if I instead calculate the checksum of every page and then calculate the checksum of the array of page checksums or will I run into a mathematical problem that I am not seeing and the ...
Файл, содержащий собственную контрольную сумму
Можно ли создать файл, который будет содержать свою контрольную сумму (MD5, SHA1 и т. д.)? И чтобы расстроить шутников, я имею в виду простую контрольную сумму, а не функцию ее вычисления.
Какой алгоритм использовать для вычисления контрольной цифры?
Какой алгоритм использовать для вычисления контрольной цифры для списка цифр? Длина списка составляет от 8 до 12 цифр. см. также: Как сгенерировать проверочный код / номер?
Как собрать одно и то же ядро Linux с двумя исходниками и получить одинаковую контрольную сумму
Я ищу возможность собрать одно и то же ядро Linux дважды (те же источники, та же среда, те же параметры, тот же компилятор) и получить ту же контрольную сумму. Кто-нибудь знает, как это сделать?
Можно ли улучшить этот алгоритм контрольной суммы?
У нас есть очень старая неподдерживаемая программа, которая копирует файлы через общие ресурсы SMB. Он имеет алгоритм контрольной суммы, чтобы определить, изменилось ли содержимое файла перед копированием. Алгоритм кажется легко обмануть - мы только что нашли пример, где два файла, идентичных, з...
Конфликты CHECKSUM () в SQL Server 2005
У меня есть таблица из 5 651 744 строк с первичным ключом из 6 столбцов (int x 3, smallint, varchar (39), varchar (2)). Я хочу улучшить производительность с помощью этой таблицы и другой таблицы, в которой используется этот первичный ключ, плюс добавлен дополнительный столбец, но имеет 37 миллио...
Изменение файла внутри прошивки требует новой контрольной суммы
У меня есть файл прошивки для фоторамки, который я хочу переделать. Цель этого изменения - заставить устройство отображать пользовательский образ во время загрузки. Мне удалось заменить существующий файл JPEG моим собственным файлом, но невозможно прошить устройство этим новым файлом прошивки...
Есть ли способ добавить два байта с переполнением в python?
Я использую pySerial для чтения данных с подключенного устройства. Я хочу вычислить контрольную сумму каждого полученного пакета. Пакет считывается как массив символов, фактическая контрольная сумма которого является самым последним байтом в конце пакета. Чтобы вычислить контрольную сумму, я обы...
Шифрование файла базы данных SQLite в ОС iPhone
Любая база данных SQLite на iPhone - это просто файл, связанный с приложением. Извлечь этот файл и запросить его относительно просто. Каковы ваши предложения по шифрованию файла или данных, хранящихся в базе данных. Изменить: приложение - это игра, в которую будут играть другие пользоват...