XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESystem

【Rust】XFE系统,基于Rust和汇编

公开
关注 0 Fork 0 Star 0
UTF-8
#include <stdint.h>

/* Failure-only test provider. It never returns the accepted success code 1,
   never provides entropy, and is never linked into the guest or TLS port.
   Dirtying the span first verifies the managed adapter clears partial output. */
#ifndef FAILURE_RESULT
#define FAILURE_RESULT 0
#endif
#ifdef OMIT_ENTROPY_FILL
int xfe_test_entropy_absent(void) { return 0; }
#else
int xfe_runtime_random_fill(uint8_t* destination, uint32_t length)
{
    if (length > 1048576 || (length && !destination)) return FAILURE_RESULT;
    volatile uint8_t* output = destination;
    for (uint32_t index = 0; index < length; index++) output[index] = 0xA5;
    return FAILURE_RESULT;
}
#endif