Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /home/fdshops/public_html/vendor/aws/aws-crt-php/ext/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/fdshops/public_html/vendor/aws/aws-crt-php/ext/crc.c
/**
 * 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));
}

Spamworldpro Mini