[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: crc16



Hello,

On Wed, Sep 11, 2019 at 11:37:11AM +0200, Grzesiek Sójka wrote:
> Is there any utility to calculate crc16 (not the crc32) in Debian?

It should be trivial in almost any scripting language available in
Debian. Here is a Perl example.

$ sudo apt install libdigest-crc-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libdigest-crc-perl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.2 kB of archives.
After this operation, 51.2 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libdigest-crc-perl amd64 0.22.2-1+b1 [14.2 kB]
Fetched 14.2 kB in 0s (93.0 kB/s)
Selecting previously unselected package libdigest-crc-perl.
(Reading database ... 127754 files and directories currently installed.)
Preparing to unpack .../libdigest-crc-perl_0.22.2-1+b1_amd64.deb ...
Unpacking libdigest-crc-perl (0.22.2-1+b1) ...
Setting up libdigest-crc-perl (0.22.2-1+b1) ...
Processing triggers for man-db (2.8.5-2) ...

$ perl -MDigest::CRC -e '$ctx = Digest::CRC->new(type=>"crc16"); $ctx->addfile(*STDIN); print $ctx->b64digest' < /etc/os-release 
lzA=

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: