!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/src/linux-headers-6.6.104-grsec-jammy+/include/crypto/internal/   drwxr-xr-x
Free 712.97 GB of 879.6 GB (81.06%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     kdf_selftest.h (1.5 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* SPDX-License-Identifier: GPL-2.0 */

/*
 * Copyright (C) 2021, Stephan Mueller <[email protected]>
 */

#ifndef _CRYPTO_KDF_SELFTEST_H
#define _CRYPTO_KDF_SELFTEST_H

#include <crypto/hash.h>
#include <linux/uio.h>

struct kdf_testvec {
    unsigned char *key;
    size_t keylen;
    unsigned char *ikm;
    size_t ikmlen;
    struct kvec info;
    unsigned char *expected;
    size_t expectedlen;
};

static inline int
kdf_test(const struct kdf_testvec *test, const char *name,
     int (*crypto_kdf_setkey)(struct crypto_shash *kmd,
                  const u8 *key, size_t keylen,
                  const u8 *ikm, size_t ikmlen),
     int (*crypto_kdf_generate)(struct crypto_shash *kmd,
                    const struct kvec *info,
                    unsigned int info_nvec,
                    u8 *dst, unsigned int dlen))
{
    struct crypto_shash *kmd;
    int ret;
    u8 *buf = kzalloc(test->expectedlen, GFP_KERNEL);

    if (!buf)
        return -ENOMEM;

    kmd = crypto_alloc_shash(name, 0, 0);
    if (IS_ERR(kmd)) {
        pr_err("alg: kdf: could not allocate hash handle for %s\n",
               name);
        kfree(buf);
        return -ENOMEM;
    }

    ret = crypto_kdf_setkey(kmd, test->key, test->keylen,
                test->ikm, test->ikmlen);
    if (ret) {
        pr_err("alg: kdf: could not set key derivation key\n");
        goto err;
    }

    ret = crypto_kdf_generate(kmd, &test->info, 1, buf, test->expectedlen);
    if (ret) {
        pr_err("alg: kdf: could not obtain key data\n");
        goto err;
    }

    ret = memcmp(test->expected, buf, test->expectedlen);
    if (ret)
        ret = -EINVAL;

err:
    crypto_free_shash(kmd);
    kfree(buf);
    return ret;
}

#endif /* _CRYPTO_KDF_SELFTEST_H */

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0749 ]--