/** * Returns a checksum for a given input string * * @param string data * @return security.checksum.Checksum */ protected function checksumOf($data) { return CRC16::fromString($data)->getValue(); }
/** * Create a new checksum from a file object * * @param io.File file * @return security.checksum.CRC16 */ public static function fromFile($file) { return CRC16::fromString(FileUtil::getContents($file)); }