亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? randm.c

?? FreeRTOSV4.1.0 安裝文件 FreeRTOS 是一個源碼公開的免費的嵌入式實時操作系統
?? C
字號:
/****************************************************************************** randm.c - Random number generator program file.** Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.* Copyright (c) 1998 by Global Election Systems Inc.** The authors hereby grant permission to use, copy, modify, distribute,* and license this software and its documentation for any purpose, provided* that existing copyright notices are retained in all copies and that this* notice and the following disclaimer are included verbatim in any * distributions. No written agreement, license, or royalty fee is required* for any of the authorized uses.** THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.******************************************************************************** REVISION HISTORY** 03-01-01 Marc Boucher <marc@mbsi.ca>*   Ported to lwIP.* 98-06-03 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.*   Extracted from avos.*****************************************************************************/#include "ppp.h"#if PPP_SUPPORT > 0#include "md5.h"#include "randm.h"#include "pppdebug.h"#if MD5_SUPPORT>0   /* this module depends on MD5 */#define RANDPOOLSZ 16   /* Bytes stored in the pool of randomness. *//*****************************//*** LOCAL DATA STRUCTURES ***//*****************************/static char randPool[RANDPOOLSZ];   /* Pool of randomness. */static long randCount = 0;      /* Pseudo-random incrementer *//***********************************//*** PUBLIC FUNCTION DEFINITIONS ***//***********************************//* * Initialize the random number generator. * * Since this is to be called on power up, we don't have much *  system randomess to work with.  Here all we use is the *  real-time clock.  We'll accumulate more randomness as soon *  as things start happening. */void avRandomInit(){    avChurnRand(NULL, 0);}/* * Churn the randomness pool on a random event.  Call this early and often *  on random and semi-random system events to build randomness in time for *  usage.  For randomly timed events, pass a null pointer and a zero length *  and this will use the system timer and other sources to add randomness. *  If new random data is available, pass a pointer to that and it will be *  included. * * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 */void avChurnRand(char *randData, u32_t randLen){    MD5_CTX md5;/*  ppp_trace(LOG_INFO, "churnRand: %u@%P\n", randLen, randData); */    MD5Init(&md5);    MD5Update(&md5, (u_char *)randPool, sizeof(randPool));    if (randData)        MD5Update(&md5, (u_char *)randData, randLen);    else {        struct {            /* INCLUDE fields for any system sources of randomness */            char foobar;        } sysData;        /* Load sysData fields here. */        ;        MD5Update(&md5, (u_char *)&sysData, sizeof(sysData));    }    MD5Final((u_char *)randPool, &md5);/*  ppp_trace(LOG_INFO, "churnRand: -> 0\n"); */}/* * Use the random pool to generate random data.  This degrades to pseudo *  random when used faster than randomness is supplied using churnRand(). * Note: It's important that there be sufficient randomness in randPool *  before this is called for otherwise the range of the result may be *  narrow enough to make a search feasible. * * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 * * XXX Why does he not just call churnRand() for each block?  Probably *  so that you don't ever publish the seed which could possibly help *  predict future values. * XXX Why don't we preserve md5 between blocks and just update it with *  randCount each time?  Probably there is a weakness but I wish that *  it was documented. */void avGenRand(char *buf, u32_t bufLen){    MD5_CTX md5;    u_char tmp[16];    u32_t n;    while (bufLen > 0) {        n = LWIP_MIN(bufLen, RANDPOOLSZ);        MD5Init(&md5);        MD5Update(&md5, (u_char *)randPool, sizeof(randPool));        MD5Update(&md5, (u_char *)&randCount, sizeof(randCount));        MD5Final(tmp, &md5);        randCount++;        memcpy(buf, tmp, n);        buf += n;        bufLen -= n;    }}/* * Return a new random number. */u32_t avRandom(){    u32_t newRand;    avGenRand((char *)&newRand, sizeof(newRand));    return newRand;}#else /* MD5_SUPPORT *//*****************************//*** LOCAL DATA STRUCTURES ***//*****************************/static int  avRandomized = 0;       /* Set when truely randomized. */static u32_t avRandomSeed = 0;      /* Seed used for random number generation. *//***********************************//*** PUBLIC FUNCTION DEFINITIONS ***//***********************************//* * Initialize the random number generator. * * Here we attempt to compute a random number seed but even if * it isn't random, we'll randomize it later. * * The current method uses the fields from the real time clock, * the idle process counter, the millisecond counter, and the * hardware timer tick counter.  When this is invoked * in startup(), then the idle counter and timer values may * repeat after each boot and the real time clock may not be * operational.  Thus we call it again on the first random * event. */void avRandomInit(){#if 0    /* Get a pointer into the last 4 bytes of clockBuf. */    u32_t *lptr1 = (u32_t *)((char *)&clockBuf[3]);    /*     * Initialize our seed using the real-time clock, the idle     * counter, the millisecond timer, and the hardware timer     * tick counter.  The real-time clock and the hardware     * tick counter are the best sources of randomness but     * since the tick counter is only 16 bit (and truncated     * at that), the idle counter and millisecond timer     * (which may be small values) are added to help     * randomize the lower 16 bits of the seed.     */    readClk();    avRandomSeed += *(u32_t *)clockBuf + *lptr1 + OSIdleCtr             + ppp_mtime() + ((u32_t)TM1 << 16) + TM1;#else    avRandomSeed += sys_jiffies(); /* XXX */#endif            /* Initialize the Borland random number generator. */    srand((unsigned)avRandomSeed);}/* * Randomize our random seed value.  Here we use the fact that * this function is called at *truely random* times by the polling * and network functions.  Here we only get 16 bits of new random * value but we use the previous value to randomize the other 16 * bits. */void avRandomize(void){    static u32_t last_jiffies;    if (!avRandomized) {        avRandomized = !0;        avRandomInit();        /* The initialization function also updates the seed. */    } else {/*        avRandomSeed += (avRandomSeed << 16) + TM1; */    	avRandomSeed += (sys_jiffies() - last_jiffies); /* XXX */    }    last_jiffies = sys_jiffies();}/* * Return a new random number. * Here we use the Borland rand() function to supply a pseudo random * number which we make truely random by combining it with our own * seed which is randomized by truely random events.  * Thus the numbers will be truely random unless there have been no * operator or network events in which case it will be pseudo random * seeded by the real time clock. */u32_t avRandom(){    return ((((u32_t)rand() << 16) + rand()) + avRandomSeed);}#endif /* MD5_SUPPORT */#endif /* PPP_SUPPORT */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产精选| 亚洲综合男人的天堂| 91在线精品一区二区三区| 日韩精品视频网| 国产精品福利一区二区三区| 久久人人97超碰com| 欧美一区二区三区色| 成人激情电影免费在线观看| 久草精品在线观看| 美女精品一区二区| 婷婷国产v国产偷v亚洲高清| 一区二区三区成人在线视频| 中文字幕一区二区三区不卡| 国产亚洲欧美日韩日本| 欧美一区二区三区思思人| 欧美日韩国产首页| 5858s免费视频成人| 欧美高清你懂得| 欧美一区二区三区在线观看| 欧美日韩视频不卡| 欧美群妇大交群的观看方式| 欧美色图第一页| 欧美日韩亚洲丝袜制服| 91.xcao| 欧美日韩国产成人在线91| 欧美福利视频一区| 欧美mv和日韩mv国产网站| 2024国产精品| 久久久久国产一区二区三区四区| 日韩欧美激情在线| 久久久www成人免费毛片麻豆| 欧美电影免费观看完整版| 亚洲精品一区在线观看| 国产欧美日韩精品a在线观看| 国产精品国产三级国产有无不卡| 国产精品久久久久久一区二区三区 | 久久精品999| 国产制服丝袜一区| 懂色av一区二区三区免费观看 | 欧美xxxx老人做受| 欧美国产一区视频在线观看| 亚洲一级电影视频| 激情av综合网| 91久久精品一区二区二区| 在线不卡中文字幕| 国产精品性做久久久久久| 白白色 亚洲乱淫| 懂色av噜噜一区二区三区av| 99精品久久只有精品| 精品婷婷伊人一区三区三| 日韩一区二区在线观看视频 | 欧美久久久久久蜜桃| 精品精品欲导航| 亚洲免费观看高清完整版在线观看| 亚洲国产aⅴ天堂久久| 国内外成人在线视频| 在线免费一区三区| 久久久久综合网| 亚洲成a人片在线观看中文| 欧美色爱综合网| 欧美激情一区二区三区| 久久99精品视频| 欧美一区二区三区四区高清| 亚洲一区二区三区四区五区黄 | 色综合天天综合在线视频| 91高清视频在线| 欧美一区二区播放| 91精品国产综合久久香蕉麻豆| 中文字幕精品一区二区精品绿巨人 | 免费的国产精品| 在线成人av网站| 天天操天天综合网| 欧美久久高跟鞋激| 亚洲www啪成人一区二区麻豆| 在线视频综合导航| 亚洲综合男人的天堂| 91精品91久久久中77777| 亚洲人成在线播放网站岛国| 97成人超碰视| 一区二区三区四区激情| 91视频www| 亚洲午夜一区二区| 欧美精品v日韩精品v韩国精品v| 亚洲成a人片综合在线| 麻豆91免费看| 日韩av在线发布| 丰满白嫩尤物一区二区| 成人99免费视频| 一区二区三区在线观看国产| 波波电影院一区二区三区| 亚洲欧美一区二区不卡| 欧美日韩另类国产亚洲欧美一级| 午夜天堂影视香蕉久久| 日韩欧美国产精品一区| 国产成人av电影在线观看| 综合av第一页| 8x8x8国产精品| 黑人巨大精品欧美黑白配亚洲| 国产婷婷精品av在线| 97久久精品人人澡人人爽| 亚洲成人先锋电影| 精品福利在线导航| 91影院在线免费观看| 午夜日韩在线电影| 精品成人a区在线观看| av不卡在线播放| 欧美亚洲日本国产| 国产一区二区调教| 国产欧美久久久精品影院| 99精品国产视频| 午夜欧美2019年伦理| 国产亚洲成av人在线观看导航| 色婷婷激情久久| 久久电影国产免费久久电影| 国产精品看片你懂得| 日韩欧美不卡一区| 91色婷婷久久久久合中文| 久久99久久99| 亚洲国产精品视频| 国产精品网站在线| 日韩免费视频一区| 欧美艳星brazzers| www.色综合.com| 国产伦精品一区二区三区在线观看| 亚洲免费观看高清完整版在线观看熊| 日韩欧美的一区二区| 色吧成人激情小说| 国产成人av影院| 久久综合综合久久综合| 亚洲图片自拍偷拍| 精品国产乱码久久久久久闺蜜 | 一区二区三区波多野结衣在线观看 | 97se亚洲国产综合自在线观| 蜜乳av一区二区| 亚洲综合丁香婷婷六月香| 国产三级欧美三级日产三级99| 一本高清dvd不卡在线观看 | 国产亚洲一区二区三区四区 | av高清久久久| 国产一区中文字幕| 免费成人你懂的| 午夜精品免费在线| 一区二区三区四区不卡在线 | 欧美性一二三区| 91麻豆高清视频| 99久久久精品免费观看国产蜜| 精品亚洲免费视频| 极品少妇xxxx精品少妇| 日韩不卡一区二区| 日韩精品五月天| 午夜伦欧美伦电影理论片| 亚洲宅男天堂在线观看无病毒| 日韩理论电影院| 一区二区免费视频| 伊人婷婷欧美激情| 亚洲欧美激情插| 一区二区三区四区高清精品免费观看 | 亚洲在线成人精品| 亚洲无人区一区| 日韩成人av影视| 麻豆专区一区二区三区四区五区| 亚洲成av人综合在线观看| 亚洲一区二区欧美激情| 亚洲成人动漫av| 免费在线欧美视频| 蜜桃精品视频在线观看| 国产乱子伦视频一区二区三区| 激情偷乱视频一区二区三区| 国产乱码精品1区2区3区| 成人激情动漫在线观看| 色婷婷av久久久久久久| 欧美人与性动xxxx| 欧美精品一区二区三区视频| 国产视频一区在线播放| 自拍偷拍亚洲欧美日韩| 亚洲一区在线观看视频| 蜜臀a∨国产成人精品| 精品在线免费观看| 成人性视频免费网站| 日本高清无吗v一区| 欧美一级日韩一级| 中文字幕+乱码+中文字幕一区| 最新高清无码专区| 日韩电影在线看| 国产精品一区免费在线观看| av在线不卡电影| 宅男噜噜噜66一区二区66| 久久久久免费观看| 亚洲免费观看高清完整版在线 | 久久久久久97三级| 一区二区三区中文字幕在线观看| 亚洲第一在线综合网站| 久久电影网站中文字幕| 99久久国产综合精品麻豆| 在线不卡中文字幕| 国产精品久久久久久久蜜臀| 午夜精品国产更新| 成人黄色电影在线| 欧美成人vps| 婷婷亚洲久悠悠色悠在线播放|