Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
xenocrat committed Aug 27, 2023
1 parent 19b4221 commit 0477dd5
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ CRC-PHP is a PHP class implementing bitwise CRC-8/16/24/32/64 algorithms.

Calculate the CRC-16/XMODEM result for a string:

$crc = \xenocrat\crc::crc16_xmodem("foobar");
use xenocrat\crc;
$crc = crc::crc16_xmodem("foobar");

Read data from disk and calculate the CRC-24/OPENPGP result:

$file = file_get_contents("README.md");
$crc = \xenocrat\crc::crc24_openpgp($file);
$crc = crc::crc24_openpgp($file);

Test all implementations by comparing a calculated result to a check value:

\xenocrat\crc::test_crc8();
\xenocrat\crc::test_crc16();
\xenocrat\crc::test_crc24();
\xenocrat\crc::test_crc32();
\xenocrat\crc::test_crc64();
$results = crc::test_crc8();
$results = crc::test_crc16();
$results = crc::test_crc24();
$results = crc::test_crc32();
$results = crc::test_crc64();

## Implementations

Expand Down

0 comments on commit 0477dd5

Please sign in to comment.