Sample code for 30+ languages & platforms
React Native

Example: Crypt2.CrcBd method

Demonstrates how to call the CrcBd method.

Chilkat React Native Downloads

React Native
import { BinData, Crypt2 } from '@chilkat/react-native'

function chilkatExample() {
  const crypt = new Crypt2();

  const bd = new BinData();
  bd.appendString('123456789', 'us-ascii');

  const crc32 = crypt.crcBd('crc-32', bd);
  // The decimal value is 3421780262 (converted to hex is 0xCBF43926)
  console.log(crc32);

  const crc8 = crypt.crcBd('crc8', bd);
  console.log(crc8);
}