Server IP : 184.154.167.98 / Your IP : 18.116.63.107 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/tampico1900/3rdparty/aws/aws-crt-php/ext/ |
Upload File : |
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include "php_aws_crt.h" PHP_FUNCTION(aws_crt_crc32) { zend_ulong prev = 0; const char *input = NULL; size_t len = 0; aws_php_parse_parameters("sl", &input, &len, &prev); if (prev > UINT32_MAX) { aws_php_throw_exception("previous crc cannot be larger than UINT32_MAX"); } RETURN_LONG((zend_ulong)aws_crt_crc32((const uint8_t *)input, len, prev)); } PHP_FUNCTION(aws_crt_crc32c) { zend_ulong prev = 0; const char *input = NULL; size_t len = 0; aws_php_parse_parameters("sl", &input, &len, &prev); if (prev > UINT32_MAX) { aws_php_throw_exception("previous crc cannot be larger than UINT32_MAX"); } RETURN_LONG((zend_ulong)aws_crt_crc32c((const uint8_t *)input, len, prev)); }