HEX
Server: Apache
System: Linux belinyu.iixcp.rumahweb.net 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: sduw1495 (3615)
PHP: 7.4.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/include/liblsapi-sha1.h
/* public api for steve reid's public domain SHA-1 implementation */
/* this file is in the public domain */

#ifndef __SHA1_H
#define __SHA1_H

/* SHA1_DIGEST_SIZE must always be visible regardless of OpenSSL. */
#define SHA1_DIGEST_SIZE 20

/*
 * When OpenSSL headers are already present, their SHA1_Init/Update/Final
 * declarations take precedence.  Redeclaring with incompatible signatures
 * causes compile errors in consumers (e.g. nginx) that include both
 * lscapi.h and OpenSSL.  Use OpenSSL's SHA_CTX as an alias so internal
 * callers that hold a SHA1_CTX* still work.
 *
 * Guard macros differ by OpenSSL version:
 *   OpenSSL 1.1.x  ->  HEADER_SHA_H
 *   OpenSSL 3.x    ->  OPENSSL_SHA_H
 */
#if !defined(OPENSSL_SHA_H) && !defined(HEADER_SHA_H)

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
    uint32_t state[5];
    uint32_t count[2];
    uint8_t  buffer[64];
} SHA1_CTX;

void SHA1_Init(SHA1_CTX* context);
void SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len);
void SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]);

#ifdef __cplusplus
}
#endif

#else  /* OpenSSL sha.h already included */

/* openssl/sha.h is already loaded; avoid redeclaring SHA1_* with
 * incompatible types.  Alias SHA1_CTX to OpenSSL's SHA_CTX so any
 * code holding a pointer to SHA1_CTX still compiles. */
#include <openssl/sha.h>
typedef SHA_CTX SHA1_CTX;

#endif  /* !OPENSSL_SHA_H && !HEADER_SHA_H */

#endif /* __SHA1_H */