text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>PT_INVALID_BLOB;
goto cleanup;
}
SymCryptMarvin32( SymCryptMarvin32DefaultSeed, (PCBYTE) &blob, sizeof( blob ) - sizeof( SYMCRYPT_BLOB_TRAILER ), checksum );
if( memcmp( checksum, &blob.trailer.checksum[0], 8 ) != 0 )
{
scError = SYMCRYPT_INVALID_BLOB;
goto cleanup... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>#include "precomp.h"
#if SYMCRYPT_CPU_X86 | SYMCRYPT_CPU_AMD64
extern SYMCRYPT_ALIGN_AT(256) const UINT32 SymCryptSha256K[64];
// Endianness transformation for 4 32-bit values in an XMM register
const SYMCRYPT_ALIGN_AT(16) UINT32 BYTE_REVERSE_32[4] = {
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>#include "precomp.h"
#if SYMCRYPT_CPU_AMD64
extern SYMCRYPT_ALIGN_AT(256) const UINT32 SymCryptSha256K[64];
// Endianness transformation for 8 32-bit values in a YMM register
const SYMCRYPT_ALIGN_AT(32) UINT32 BYTE_REVERSE_32X2[8] = {
0x00010203, 0x04050607, 0x08090a0b, 0x0c0d0e0f,
0x000102... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>8i *)&pbData[ 0 ] ), BYTE_REVERSE_32 ));
_mm_store_si128( (__m128i *)&W.ul[ 4], _mm_shuffle_epi8( _mm_loadu_si128( (__m128i *)&pbData[ 16 ] ), BYTE_REVERSE_32 ));
_mm_store_si128( (__m128i *)&W.ul[ 8], _mm_shuffle_epi8( _mm_loadu_si128( (__m128i *)&pbData[ 32 ] ), BYTE_REVERSE_32 ));
... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>Byte[3] += 32;
T4 = _mm256_shuffle_epi8( _mm256_loadu_si256( (__m256i *) ppByte[4] ), BYTE_REVERSE_32 ); ppByte[4] += 32;
T5 = _mm256_shuffle_epi8( _mm256_loadu_si256( (__m256i *) ppByte[5] ), BYTE_REVERSE_32 ); ppByte[5] += 32;
T6 = _mm256_shuffle_epi8( _mm256_loadu_si... | fim | winsiderss/systeminformer | c |
//
// Sha256Par.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This module contains the routines to implement SHA2-256 from FIPS 180-2 in parallel mode
//
#include "precomp.h"
extern SYMCRYPT_ALIGN_AT( 256 ) const UINT32 SymCryptSha256K[64];
//
// Not all CPU architectures su... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>e[22] = state[14]; \
state[14] = state[20]; state[20] = state[ 2]; state[ 2] = state[12]; state[12] = state[13]; state[13] = state[19]; \
state[19] = state[23]; state[23] = state[15]; state[15] = state[ 4]; state[ 4] = state[24]; state[24] = state[21]; \
state[21] = state[ 8]; state[ 8] = stat... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>24(SymCryptTestMsg3, sizeof(SymCryptTestMsg3), result);
SymCryptInjectError(result, sizeof(result));
if (memcmp(result, sha3_224KATAnswer, sizeof(result)) != 0)
{
SymCryptFatal('SHA3');
}
}
<|fim_prefix|>//
// Sha3_224.c
//
// Copyright (c) Microsoft Corporation. Licensed under t... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>T_SHA3_256_STATE_EXPORT_SIZE) PCBYTE pbBlob)
{
SYMCRYPT_ERROR scError = SymCryptKeccakStateImport(SymCryptBlobTypeSha3_256State, &pState->ks, pbBlob);
if (scError == SYMCRYPT_NO_ERROR)
{
SYMCRYPT_SET_MAGIC(pState);
}
return scError;
}
//
// Simple tes... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>ude "hash_pattern.c"
#undef ALG
#undef Alg
//
// SymCryptSha3_384Init
//
VOID
SYMCRYPT_CALL
SymCryptSha3_384Init(_Out_ PSYMCRYPT_SHA3_384_STATE pState)
{
SymCryptKeccakInit(&pState->ks,
SYMCRYPT_SHA3_384_INPUT_BLOCK_SIZE,
SYMCRYPT_SHA3_PADDING_VALUE);
... | fim | winsiderss/systeminformer | c |
//
// Sha3_512.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
//
// See the symcrypt.h file for documentation on what the various functions do.
//
const SYMCRYPT_HASH SymCryptSha3_512Algorithm_default = {
&SymCryptSha3_512Init,
&SymCryptSha3_512Append,
... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>#include "precomp.h"
#if SYMCRYPT_CPU_AMD64
extern SYMCRYPT_ALIGN_AT(64) const UINT64 SymCryptSha512K[81];
// Endianness transformation for 4 64-bit values in a YMM register
const SYMCRYPT_ALIGN_AT(32) UINT64 BYTE_REVERSE_64X2[4] = {
0x0001020304050607, 0x08090a0b0c0d0e0f,
0x000102030405060... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// Sha512.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This module contains the routines to implement SHA2-512 from FIPS 180-2
//
#include "precomp.h"
//
// SHA-512 uses 80 magic constants of 64 bits each. These are
// referred to as K^{512}_i for i=0...79 b... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// Sha512Par-ymm.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
// All YMM code for SHA-512/SHA-384 Parallel operations
// Requires compiler support for avx2
//
#include "precomp.h"
extern SYMCRYPT_ALIGN_AT( 64 ) const UINT64 SymCryptSha512K[81];
#if SYMCRYPT_CPU_X... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// Sha512Par.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This module contains the routines to implement SHA-512/SHA-384 from FIPS 180-2 in parallel mode
//
#include "precomp.h"
extern SYMCRYPT_ALIGN_AT( 64 ) const UINT64 SymCryptSha512K[81];
//
// Not all ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>t[length] = (BYTE)length;
}
return ret; // total number of bytes written to pbOutput
}
//
// SymCryptKeccakAppendEncodeTimes8
//
VOID
SYMCRYPT_CALL
SymCryptKeccakAppendEncodeTimes8(
_Inout_ SYMCRYPT_KECCAK_STATE *pState,
UINT64 uValue,
BOOLEAN bLeftEncode)
{
BYT... | fim | winsiderss/systeminformer | c |
<|fim_suffix|> PCBYTE pbData,
SIZE_T cbData)
{
SymCryptKeccakAppend(&pState->ks, pbData, cbData);
}
//
// SymCryptShakeExtract
//
VOID
SYMCRYPT_CALL
SYMCRYPT_XxxExtract(
_Inout_ PSYMCRYPT_XXX_STATE pState,
_Out_writes_(cbResult) PBYTE ... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// Parameters for trial division mechanism
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
// GENERATED FILE, DO NOT EDIT.
//
//
// The primes are put into groups of consecutive primes (skipping 2, 3, 5, and 17).
// Each group has a product less than SYMCRYP<|fim_suffix|>RIME_... | fim | winsiderss/systeminformer | c |
<|fim_suffix|> 845, 4, 37813 },
{ 31307, 3, 1270271 },
{ 0, 2, 0xffffffff },
};
<|fim_prefix|>//
// Parameters for trial division mechanism
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
// GENERATED FILE, DO NOT EDIT.
//
//
// The primes are put into groups of consecutive pri... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// sp800_108.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This module contains the routines to implement the SP800-108 CTR KDF function
//
//
#include "precomp.h"
SYMCRYPT_ERROR
SYMCRYPT_CALL
SymCryptSp800_108Derive(
_In_ PCSYMCRYPT... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>OID
SYMCRYPT_CALL
SymCryptSp800_108_HmacSha1SelfTest(void)
{
BYTE res[sizeof(sp800_108_sha1Answer)];
SymCryptSp800_108(
SymCryptHmacSha1Algorithm,
&SymCryptTestKey32[0], 8, // key
(PCBYTE)"Label", 5, // label
&SymCryptTestKey32[16], 16, ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>es,
sizeof(res));
SymCryptInjectError( res, sizeof( res ) );
if (memcmp(res, sp800_108_sha256Answer, sizeof(res)) !=0)
{
SymCryptFatal('8108');
}
}
<|fim_prefix|>//
// sp800_108_hmacsha256.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>res,
sizeof(res));
SymCryptInjectError( res, sizeof( res ) );
if (memcmp(res, sp800_108_sha384Answer, sizeof(res)) !=0)
{
SymCryptFatal('8108');
}
}
static const BYTE sp800_108_sha512Answer[] =
{
0xdb, 0x3a, 0x18, 0xd9, 0x6c, 0x4a, 0xd4, 0x1e,
};
VOID
SYMCRYPT_CA... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>Key, X, lastBlockBytes, lastBlockBytes, 16);
memcpy(pbOutput + 16 * (cbOutput / 16), lastBlockBytes, cbOutput & 0xf);
SymCryptWipeKnownSize(lastBlockBytes, sizeof(lastBlockBytes));
}
cleanup:
return scError;
}
SYMCRYPT_ERROR
SYMCRYPT_CALL
SymCryptSrtpKdf(
_In_reads_(cbKey... | fim | winsiderss/systeminformer | c |
<|fim_suffix|> (label < SYMCRYPT_SRTCP_ENCRYPTION_KEY) ? 48 : 32,
label,
rbResultAes128, sizeof(rbResultAes128));
SymCryptInjectError(rbResultAes128, sizeof(rbResultAes128));
if (memcmp(rbResultAes128, pbResultAes128, sizeof(pbResultAes128))... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>ut,
SIZE_T cbOutput)
{
SYMCRYPT_SSHKDF_EXPANDED_KEY expandedKey;
SYMCRYPT_ERROR scError = SYMCRYPT_NO_ERROR;
scError = SymCryptSshKdfExpandKey(&expandedKey, pHashFunc, pbKey, cbKey);
if (scError != SYMCRYPT_NO_ERROR)
{
goto cleanup;
... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>x18, 0xca, 0xfd, 0x53, 0x0e, 0x72, 0xfe, 0x43
};
VOID
SYMCRYPT_CALL
SymCryptSshKdfSha256SelfTest(void)
{
SYMCRYPT_SSHKDF_EXPANDED_KEY expandedKey;
SYMCRYPT_ALIGN BYTE rbResult[sizeof(pbResult)];
SymCryptSshKdfExpandKey(&expandedKey, SymCryptSha256Algorithm, pbKey, sizeof(pbKey));
SymCry... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>0xa4, 0x12, 0x5a, 0xa9, 0x89, 0x80, 0x92, 0xca, 0x50, 0xc3, 0xc1, 0x63, 0x1c, 0x03, 0xdc, 0xbc,
0x9d, 0xf9, 0x5c, 0xeb, 0xb4, 0x09, 0x88, 0x1e, 0x58, 0x01, 0x08, 0xb6, 0xcc, 0x47, 0x04, 0xb7,
0x6c, 0xc7, 0x7b, 0x87, 0x95, 0xfd, 0x59, 0x40, 0x56, 0x1e, 0x32, 0x24, 0xcc, 0x75, 0x84, 0x85,
0x18, ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|> SIZE_T cbInfo,
_Out_writes_(cbResult) PBYTE pbResult,
SIZE_T cbResult)
{
SYMCRYPT_HASH_STATE state;
PBYTE pbCurr = pbResult;
SIZE_T cbHashResultSize = hashAlgorithm->resultSize;
SIZE_T cbPartialResult;
... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// sskdf_selftest.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
sta<|fim_suffix|>sizeof(pbResult));
SymCryptInjectError(rbResult, sizeof(pbResult));
if (memcmp(rbResult, pbResult, sizeof(pbResult)) != 0)
{
SymCryptFatal('ssk... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// status_indicator.h Implements FIPS 140-3 Approved Services Status Indicator
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
// Each module that exports SymCryptDeprecatedStatusIndicator function should define the
// following symbol and also the corresponding service ... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// tlsCbcVerify.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
//
// This code needs to process data in words, and we'd like to use 32-bit words on 32-bit
// architectures and 64-bit words on 64-bit architectures. So we use NATIVE_UINT & friends.
... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// tlsprf.c
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This module contains the routines to implement the two PRF
// functions for the TLS protocols 1.1 and 1.2. These are used in
// the protocol's key derivation function.
//
//
#include "precomp.h"
//
// TLS... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>tal('tl11');
}
}
VOID
SYMCRYPT_CALL
SymCryptTlsPrf1_2SelfTest(void)
{
SYMCRYPT_ALIGN BYTE rbResult[sizeof(pbResult1_2Sha512)];
SymCryptTlsPrf1_2(
SymCryptHmacSha512Algorithm,
&SymCryptTestKey32[0], 15,
&SymCryptTestKey32[16], 16,
&SymCryptTestMsg3[0], 3,
... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// xmss.c XMSS and XMSS^MT implementation
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
//
// See the symcrypt.h file for documentation on what the various functions do.
//
// Maximum size of the domain separator prefix used in PRFs
#define SYMCR... | fim | winsiderss/systeminformer | c |
<|fim_suffix|> // Copy prefix of buf[SYMCRYPT_AES_BLOCK_SIZE] to the right place in the destination buffer
memcpy( pbDst + SYMCRYPT_AES_BLOCK_SIZE, &buf[SYMCRYPT_AES_BLOCK_SIZE], cbData );
// Do final tweak update
SymCryptXtsUpdateTweak( pbTweakBlock );
// Set pbSrc correctly to shar... | fim | winsiderss/systeminformer | c |
//
// xtsaes_definitions.h
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// Multiply by alpha
//
// <</>> indicate shifts on 128-bit values
// <<<</>>>> indicate shifts on 32-bit values (a word)
//
// Multiply by ALPHA
// Since there's no instruction to shift the 128 bit register le... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>( bOverflow && previousTweakLow64 > tweakLow64 )
{
// Very rare fix-up of tweaks if tweakLow64 overflowed, and should have incremented tweakHigh64
// bOverflow=FALSE allows backwards compatibility with old API which wrapped around at 64-bits
SYMCRYPT_ASSERT( twe... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// callbacks_pthread.c
// Contains symcrypt call back functions for pthreads
//
// Copyright (c) Microsoft Corporat<|fim_suffix|>oc(SYMCRYPT_ASYM_ALIGN_VALUE, cbAllocation);
}
VOID
SYMCRYPT_CALL
SymCryptCallbackFree( VOID * pMem )
{
free( pMem );
}
SYMCRYPT_ERROR
SYMCRYPT_CALL
SymCryptCallbackRan... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>SYMCRYPT_ASYM_ALIGN_VALUE - 1);
return aligned_alloc(SYMCRYPT_ASYM_ALIGN_VALUE, cbAllocation);
}
VOID
SYMCRYPT_CALL
SymCryptCallbackFree( VOID * pMem )
{
free( pMem );
}
SYMCRYPT_ERROR
SYMCRYPT_CALL
SymCryptCallbackRandom( PBYTE pbBuffer, SIZE_T cbBuffer )
{
SymCryptRandom( pbBuffer, cbBuff... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// integrity.c
// FIPS 140-3 integrit<|fim_suffix|>YPT_FIPS_ASSERT( pltTotalSize % sizeof( Elf_Rela ) == 0 );
relaInfo->pltRelaEntryCount = pltTotalSize / sizeof( Elf_Rela );
}
else
{
SYMCRYPT_FIPS_ASSERT( pltTotalSize % sizeof( Elf_Rel ) == 0 );
... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// integrity.h
// FIPS 140-3 integrity verification header for ELF binaries
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
VOID SymCryptModuleVerifyIntegrity(void);
//
// This function verifies the integrity of the loadable segments of the SymCrypt ELF module using
// HM... | fim | winsiderss/systeminformer | c |
//
// module.c
// Main file for SymCrypt shared object libraries on Posix-based systems
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
// Module main function executed by the runtime upon load
VOID __attribute__((constructor)) SymCryptModuleMain(void)
{
SymCryp... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// nointegrity.c
// Dummy implementation of SymCryptModuleVerifyIntegrity if no integrity verification is needed
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
<|fim_suffix|>d) {}<|fim_middle|>
VOID SymCryptModuleVerifyIntegrity(voi<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_suffix|>X_USERMODE
<|fim_prefix|>//
// module_posixUserMode.c
// SymCrypt env defined for posix user mode
//
//<|fim_middle|> Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
SYMCRYPT_ENVIRONMENT_POSI<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// rngfipsjitter.c
// Defines FIPS entropy functions using Jitter as the source
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
#include "jitterentropy.h"
static struct rand_data* g_jitter_entropy_collector = NULL;
// Initialize Jitter source and a... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// rngforkdetection.c
// Defines fork detection functions using getpid system call and a global variable.
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
#include <unistd.h>
pid_t g_pid = 0;
// Sets the initial pid
VOID
SYMCRYPT_CALL
SymCryptRngFork... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// rngsecureurandom.c
// Defines secure entropy functions using urandom as the source
//
// Co<|fim_suffix|>crosoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
#include <sys/random.h>
// Nothing to init
VOID
SYMCRYPT_CALL
SymCryptEntropySecureInit(void){}
// Nothing to unini... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// SymCrypt posix shared object library pre-co<|fim_suffix|>.h"
#include "elfdefinitions.h"
#include "integrity.h"
#include "rng.h"
#include "../modules/symcrypt_modules_common.h"
<|fim_middle|>mpiled header file
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include <... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// rng.c
// Implements common RNG infrastructure for modules
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
#include "rng.h"
#include "symcrypt_low_level.h"
// Size of small entropy request cache, same as Windows
#define RANDOM_NUM_CACHE_SIZE ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>o reseed the RNG state if a fork is detected. Each module
// must define these, as each module may have different constraints around whether forks are
// possible and which system calls are available.
//
// Initializes fork detection system (may do nothing)
VOID
SYMCRYPT_CALL
SymCryptRngForkDetectionInit... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>ensed under the MIT license.
//
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "symcrypt.h"
#include "rng.h"
<|fim_prefix|>//
// <|fim_middle|>SymCrypt DLL/shared object library pre-compiled header file
//
// Copyright (c) Microsoft Corporation. Lic<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_suffix|>statusindicator_common.h"
#include "../lib/status_indicator.h"
<|fim_prefix|>//
// SymCrypt FIPS Status Indicator
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.<|fim_middle|>
//
#include "precomp.h"
#define SYMCRYPT_FIPS_STATUS_INDICATOR
#include "../modules/<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// SymCrypt DLL/sh<|fim_suffix|>ft Corporation. Licensed under the MIT license.
//
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "symcrypt.h"
#include "integrity.h"
#include "rng.h"<|fim_middle|>ared object library pre-compiled header file
//
// Copyright (c) Microso<|endoftext|... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>ng.h"
// Forward declaration of OpenEnclave function to get host entropy.
// This is dynamically linked at runtime by OE.
__attribute__((weak)) int oe_sgx_get_additional_host_entropy(uint8_t* data, size_t size);
// RDSEED is our SP 800-90B compliant entropy source.
VOID
SYMCRYPT_CALL
SymCryptEntropyFips... | fim | winsiderss/systeminformer | c |
//
// SymCrypt FIPS Status Indicator
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
#define SYMCRYPT_FIPS_STATUS_INDICATOR
#include "../modules/statusindicator_common.h"
#include "../lib/status_indicator.h"
<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_suffix|>ation. Licensed under the MIT license.
//
#include "precomp.h"
SYMCRYPT_ENVIRONMENT_OPTEE_TA
<|fim_prefix|>//
// module_opteeTa.c
// S<|fim_middle|>ymCrypt env defined for optee TA
//
// Copyright (c) Microsoft Corpor<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// rng.c
// Defines secure entropy functions using TEE_GenerateRand<|fim_suffix|>) Microsoft Corporation. Licensed under the MIT license.
//
#include "precomp.h"
#include "rng.h"
// TEE_GenerateRandom gets FIPS/secure RNG from OPTEE (will be Unresolved symbol and will be resolved in linker phase with... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>receding call to SymCryptRsakeySetValue or SymCryptRsakeySetValueFromPrivateExponent with cbModulus parameter greater than or equal to 128 when calling SymCryptRsaPkcs1Verify and SymCryptRsaPssVerify.") \
FIPS_SERVICE_DESC("hashAlgorithm parameter may refer to SymCryptSha1Algorithm only when calli... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>nformation internal to the SymCrypt modules
// Set this flag to 1 to enable FIPS self-tests in the SymCrypt module.
#ifndef SYMCRYPT_MODULE_DO_FIPS_SELFTESTS
#define SYMCRYPT_MODULE_DO_FIPS_SELFTESTS 1
#endif
// Set this flag to 1 to enable use of FIPS entropy source in the SymCrypt module.
#ifndef SYMC... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>_In_ PSYMCRYPT_ENTROPY_ACCUMULATOR_LOGGING_STATE pState)
{
// ExInitializeWorkItem and ExQueueWorkItem are marked as deprecated
#pragma warning(push)
#pragma warning(disable : 4996)
ExInitializeWorkItem(
&pState->WorkQueueItem,
SymCryptEntropyAccumulatorWriteSamplesWorker,
(P... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// module.c
// Main file for SymCrypt Windows kernel mode module, symcryptk.dll
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
#include <ntddk.h>
#include <ntstrsafe.h>
#include <windef.h>
#include <symcrypt.h>
#include <symcrypt_low_level.h>
SYMCRYPT_ENVIRONMENT_WINDOW... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//
// SymCrypt_winkernel.h
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This file contains definitions that are specific to the Windows kernel module.
// Note that this header requires inclusion of symcrypt.h to be compiled, whilst
// symcrypt_winkernel_types.h does... | fim | winsiderss/systeminformer | c |
//
// SymCrypt_winkernel_types.h
//
// Copyright (c) Microsoft Corporation. Licensed under the MIT license.
//
//
// This file contains type definitions that are specific to the Windows kernel module
// without including any dependencies directly.
//
#pragma once
/////////////////////////////////////////////////////... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>SS(SymCryptSystemRandom(secureEntropy, sizeof(secureEntropy))))
memset(secureEntropy, 0, sizeof(secureEntropy));
RtlAcquireSRWLockExclusive(&SymCryptProvidedEntropyLock);
SymCryptSha256Init(&hashState);
SymCryptSha256Append(&hashState, SymCryptProvidedEntropy, sizeof(SymCryptProvided... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>//////////////////////////////////////////////////////////////////////////////
//
// Core Detours Functionality (detours.cpp of detours.lib)
//
// Microsoft Research Detours Package, Version 4.0.1
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//#define DETOUR_DEBUG 1
#define DET... | fim | winsiderss/systeminformer | cpp |
<|fim_suffix|>:value, int>::type = 0>
NTSTATUS DetourDetach(_Inout_ T *ppPointer,
_In_ T pDetour) noexcept
{
return DetourDetach(
reinterpret_cast<void**>(ppPointer),
reinterpret_cast<void*>(pDetour));
}
#endif // __cplusplus >= 201103L || _MSVC_LANG >= 201103L
//
////////////////... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>#<|fim_suffix|>disasm.cpp"
<|fim_middle|>define DETOURS_ARM_OFFLINE_LIBRARY
#include "<|endoftext|> | fim | winsiderss/systeminformer | cpp |
#define DETOURS_ARM64_OFFLINE_LIBRARY
#include "disasm.cpp"
<|endoftext|> | fim | winsiderss/systeminformer | cpp |
#define DETOURS_IA64_OFFLINE_LIBRARY
#include "disasm.cpp"
<|endoftext|> | fim | winsiderss/systeminformer | cpp |
<|fim_suffix|>
<|fim_prefix|>#define DETOURS_X64<|fim_middle|>_OFFLINE_LIBRARY
#include "disasm.cpp"<|endoftext|> | fim | winsiderss/systeminformer | cpp |
<|fim_suffix|>asm.cpp"
<|fim_prefix|>#defi<|fim_middle|>ne DETOURS_X86_OFFLINE_LIBRARY
#include "dis<|endoftext|> | fim | winsiderss/systeminformer | cpp |
<|fim_suffix|>GNATURE)
return 0;
PIMAGE_NT_HEADERS pNtHeader = static_cast<PIMAGE_NT_HEADERS>(PTR_ADD_OFFSET(pDosHeader, pDosHeader->e_lfanew));
if (pNtHeader->Signature != IMAGE_NT_SIGNATURE)
return 0;
if (pNtHeader->FileHeader.SizeOfOptionalHeader == 0)
return 0;
return pNt... | fim | winsiderss/systeminformer | cpp |
<|fim_prefix|>/*
* $Id: arraylist.c,v 1.4 2006/01/26 02:16:28 mclark Exp $
*
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
* Michael Clark <michael@metaparadigm.com>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>array_list *arr, size_t idx, size_t count);
/**
* Shrink the array list to just enough to fit the number of elements in it,
* plus empty_slots.
*/
extern int array_list_shrink(struct array_list *arr, size_t empty_slots);
#ifdef __cplusplus
}
#endif
#endif
<|fim_prefix|>/*
* $Id: arraylist.h,v 1.4 2... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>of this package. */
#define PACKAGE_VERSION "0.18."
/* The number of bytes in type int */
#define SIZEOF_INT 4
/* The number of bytes in type int64_t */
#define SIZEOF_INT64_T 8
/* The number of bytes in type long */
#define SIZEOF_LONG 4
/* The number of bytes in type long long */
#define SIZEOF_LONG... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/*
* $Id: debug.c,v 1.5 2006/01/26 02:16:28 mclark Exp $
*
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
* Michael Clark <michael@metaparadigm.com>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
*/
... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/*
* $Id: debug.h,v 1.5 2006/01/30 23:07:57 mclark Exp $
*
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
* Michael Clark <michael@metaparadigm.com>
* Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
*
* This library is free software; you can redistribute it and/or modify
* it under... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
*/
/**
* @file
* @brief A convenience header that may be included instead of other individual ones.
*/
#ifndef _json_h_
#define _json_h_
#ifdef __cplusplus
extern "C" {
#endif
#incl... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/*
* Copyright (c) 2012 Eric Haszlakiewicz
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*/
#include "conf<|fim_suffix|>
}
int json_c_version_num(void)
{
return JSON_C_VERSION_NUM;
}
<|fim_middle|>ig.h"
... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>#define JSON_EXPORT __declspec(dllexport)
#else
#define JSON_EXPORT extern
#endif
#endif
/**
* @see JSON_C_VERSION
* @return the version of the json-c library as a string
*/
JSON_EXPORT const char *json_c_version(void); /* Returns JSON_C_VERSION */
/**
* The json-c version encoded into an int, with ... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/* Define<|fim_suffix|>DINT_H 1
<|fim_middle|> to 1 if you have the <inttypes.h> header file. */
#define JSON_C_HAVE_INTTYPES_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define JSON_C_HAVE_ST<|endoftext|> | fim | winsiderss/systeminformer | c |
<|fim_prefix|>
/**
* @file
* @brief Do not use, json-c internal, may be changed or removed at any time.
*/
#ifndef _json_inttypes_h_
#define _json_inttyp<|fim_suffix|>fig.h"
#ifdef JSON_C_HAVE_INTTYPES_H
/* inttypes.h includes stdint.h */
#include <inttypes.h>
#else
#ifdef JSON_C_HAVE_STDINT_H
#include <stdint.h>
... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>tbuf *pb, int level,
int flags)
{
size_t userdata_len = strlen((const unsigned char *)jso->_userdata);
printbuf_memappend(pb, (const unsigned char *)jso->_userdata, userdata_len);
return userdata_len;
}
void json_object_free_userdata(struct json_object ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>ct_get_array(const struct json_object *obj);
/** Get the length of a json_object of type json_type_array
* @param obj the json_object instance
* @returns the length of the array
*/
JSON_EXPORT size_t json_object_array_length(const struct json_object *obj);
/** Sorts the elements of jso of type json_t... | fim | winsiderss/systeminformer | c |
<|fim_suffix|> lh_table structure set to NULL. For such an
* object, json_object_iter_begin will return an iterator with
* the opaque_ field set to NULL, which is equivalent to the
* "end" iterator.
*
* When iterating, we simply update the iterator's opaque_ field
* to point to the next lh_entry structure in the... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/**
*******************************************************************************
* @file json_object_iterator.h
*
* Copyright (c) 2009-2012 Hewlett-Packard Development Company, L.P.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COP... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>oolean;
};
struct json_object_double
{
struct json_object base;
double c_double;
};
struct json_object_int
{
struct json_object base;
enum json_object_int_type cint_type;
union
{
int64_t c_int64;
uint64_t c_uint64;
} cint;
};
struct json_object_string
{
stru... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/*
* Copyright (c) 2016 Alexandru Ardelean.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
*/
#include "config.h"
#include "strerror_override.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#includ... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/*
* Copyright (c) 2016 Alexadru Ardelean.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
*/
/**
* @file
* @brief JSON Pointer (RFC 6901) implementation for retrieving
* objects from a json-c object tree... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>*path,
struct json_object *value,
json_pointer_array_set_cb array_set_cb, void *priv);
#ifdef __cplusplus
}
#endif
#endif
<|fim_prefix|>/*
* Copyright (c) 2023 Eric Hawicz
*
* This library is free software; you can redistribute it ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>r - case_start);
current =
json_object_new_string_len(tok->pb->buf, tok->pb->bpos);
if (current == NULL)
{
tok->err = json_tokener_error_memory;
goto out;
... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>(tok, mystring, stringlen);
} while ((jerr = json_tokener_get_error(tok)) == json_tokener_continue);
if (jerr != json_tokener_success)
{
fprintf(stderr, "Error: %s\n", json_tokener_error_desc(jerr));
// Handle errors, as appropriate for your application.
}
if (json_tokener_get_parse_end(tok) < str... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>d by json-c
*/
typedef struct json_object json_object;
/**
* Type of custom user delete functions. See json_object_set_serializer.
*/
typedef void(json_object_delete_fn)(struct json_object *jso, void *userdata);
/**
* Type of a custom serialization function. See json_object_set_serializer.
*/
typ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>(n);
return realloc(p, n);
}
#endif
#define NELEM(a) (sizeof(a) / sizeof(a[0]))
/* clang-format off */
static const unsigned char *json_type_name[] = {
/* If you change this, be sure to update the enum json_type definition too */
"null",
"boolean",
"double",
"int",
"object",
... | fim | winsiderss/systeminformer | c |
/*
* $Id: json_util.h,v 1.4 2006/01/30 23:07:57 mclark Exp $
*
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
* Michael Clark <michael@metaparadigm.com>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*
*/
/**
* @fi... | fim | winsiderss/systeminformer | c |
<|fim_prefix|>/*
* Copyright (c) 2016 Eric Haszlakiewicz
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*/
#include <stdio.h>
#include "config.h"
#include "json_inttypes.h"
#include "json_object.h"
#include "json_visit.h"
#includ... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>iteration
* of the fields/elements of the <b>containing</b> object should stop
* and continue "popped up" a level of the object hierarchy.
* For example, returning this when handling arg will result in
* arg3 and any other fields being skipped. The next call to userfunc
* will be the JSON_C_VISIT_S... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>*/
#endif
#endif
#include "json_object.h"
__warn_references(json_object_get, "Warning: please link against libjson-c instead of libjson");
/* __asm__(".section .gnu.warning." __STRING(sym) \
" ; .ascii \"" msg "\" ; .text") */
<|fim_prefix|>
/* dummy source file for compatibility p... | fim | winsiderss/systeminformer | c |
<|fim_suffix|>SH_LITTLE_ENDIAN 1
#define HASH_BIG_ENDIAN 0
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN) || \
(defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))
#define HASH_LITTLE_ENDIAN 0
#define HASH_BIG_ENDIAN 1
#else
#define HASH_LITTLE_ENDIAN 0
#d... | fim | winsiderss/systeminformer | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.