91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 831KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-07
  • 語言: 其他
  • 標簽: libevent??

資源簡介

libevent-2.0.21-stable,

資源截圖

代碼片段和文件信息

/*?Portable?arc4random.c?based?on?arc4random.c?from?OpenBSD.
?*?Portable?version?by?Chris?Davis?adapted?for?Libevent?by?Nick?Mathewson
?*?Copyright?(c)?2010?Chris?Davis?Niels?Provos?and?Nick?Mathewson
?*?Copyright?(c)?2010-2012?Niels?Provos?and?Nick?Mathewson
?*
?*?Note?that?in?Libevent?this?file?isn‘t?compiled?directly.??Instead
?*?it‘s?included?from?evutil_rand.c
?*/

/*
?*?Copyright?(c)?1996?David?Mazieres?
?*?Copyright?(c)?2008?Damien?Miller?
?*
?*?Permission?to?use?copy?modify?and?distribute?this?software?for?any
?*?purpose?with?or?without?fee?is?hereby?granted?provided?that?the?above
?*?copyright?notice?and?this?permission?notice?appear?in?all?copies.
?*
?*?THE?SOFTWARE?IS?PROVIDED?“AS?IS“?AND?THE?AUTHOR?DISCLAIMS?ALL?WARRANTIES
?*?WITH?REGARD?TO?THIS?SOFTWARE?INCLUDING?ALL?IMPLIED?WARRANTIES?OF
?*?MERCHANTABILITY?AND?FITNESS.?IN?NO?EVENT?SHALL?THE?AUTHOR?BE?LIABLE?FOR
?*?ANY?SPECIAL?DIRECT?INDIRECT?OR?CONSEQUENTIAL?DAMAGES?OR?ANY?DAMAGES
?*?WHATSOEVER?RESULTING?FROM?LOSS?OF?USE?DATA?OR?PROFITS?WHETHER?IN?AN
?*?ACTION?OF?CONTRACT?NEGLIGENCE?OR?OTHER?TORTIOUS?ACTION?ARISING?OUT?OF
?*?OR?IN?CONNECTION?WITH?THE?USE?OR?PERFORMANCE?OF?THIS?SOFTWARE.
?*/

/*
?*?Arc4?random?number?generator?for?OpenBSD.
?*
?*?This?code?is?derived?from?section?17.1?of?Applied?Cryptography
?*?second?edition?which?describes?a?stream?cipher?allegedly
?*?compatible?with?RSA?Labs?“RC4“?cipher?(the?actual?description?of
?*?which?is?a?trade?secret).??The?same?algorithm?is?used?as?a?stream
?*?cipher?called?“arcfour“?in?Tatu?Ylonen‘s?ssh?package.
?*
?*?Here?the?stream?cipher?has?been?modified?always?to?include?the?time
?*?when?initializing?the?state.??That?makes?it?impossible?to
?*?regenerate?the?same?random?sequence?twice?so?this?can‘t?be?used
?*?for?encryption?but?will?generate?good?random?numbers.
?*
?*?RC4?is?a?registered?trademark?of?RSA?Laboratories.
?*/

#ifndef?ARC4RANDOM_EXPORT
#define?ARC4RANDOM_EXPORT
#endif

#ifndef?ARC4RANDOM_UINT32
#define?ARC4RANDOM_UINT32?uint32_t
#endif

#ifndef?ARC4RANDOM_NO_INCLUDES
#ifdef?WIN32
#include?
#include?
#else
#include?
#include?
#include?
#include?
#ifdef?_EVENT_HAVE_SYS_SYSCTL_H
#include?
#endif
#endif
#include?
#include?
#include?
#endif

/*?Add?platform?entropy?32?bytes?(256?bits)?at?a?time.?*/
#define?ADD_ENTROPY?32

/*?Re-seed?from?the?platform?RNG?after?generating?this?many?bytes.?*/
#define?BYTES_BEFORE_RESEED?1600000

struct?arc4_stream?{
unsigned?char?i;
unsigned?char?j;
unsigned?char?s[256];
};

#ifdef?WIN32
#define?getpid?_getpid
#define?pid_t?int
#endif

static?int?rs_initialized;
static?struct?arc4_stream?rs;
static?pid_t?arc4_stir_pid;
static?int?arc4_count;
static?int?arc4_seeded_ok;

static?inline?unsigned?char?arc4_getbyte(void);

static?inline?void
arc4_init(void)
{
int?????n;

for?(n?=?0;?n? rs.s[n]?=?n;
rs.i?=?0;
rs.j?=?0;
}

st

評論

共有 條評論