Skip to content

anhoder/crc64-php-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crc64 extension for PHP.

Based on rolling-dual-crc

Build

Need to install rust for compilation.

Use Cargo

cargo build --release

# test
cargo build && cargo test

target/release/libcrc64.so(or target/release/libcrc64.dylib) is the compiled extension.

Use Make

phpize && ./configure && make

# test
make test

make install

Usage

$crc = new Crc\DualCrc();

$crc->update('123456');
printf("0x%x\n", $crc->get64());

$crc->update('7890');
printf("0x%x\n", $crc->get64());

About

crc64 extension for php written by Rust.

Resources

Stars

Watchers

Forks