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

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

?? crypt.c

?? zip壓縮
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*  Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.  See the accompanying file LICENSE, version 2000-Apr-09 or later  (the contents of which are also included in zip.h) for terms of use.  If, for some reason, all these files are missing, the Info-ZIP license  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html*//*  crypt.c (full version) by Info-ZIP.      Last revised:  [see crypt.h]  This encryption/decryption source code for Info-Zip software was  originally written in Europe.  The whole source package can be  freely distributed, including from the USA.  (Prior to January 2000,  re-export from the US was a violation of US law.)  NOTE on copyright history:  Previous versions of this source package (up to version 2.8) were  not copyrighted and put in the public domain.  If you cannot comply  with the Info-Zip LICENSE, you may want to look for one of those  public domain versions. *//*  This encryption code is a direct transcription of the algorithm from  Roger Schlafly, described by Phil Katz in the file appnote.txt.  This  file (appnote.txt) is distributed with the PKZIP program (even in the  version without encryption capabilities). */#define ZCRYPT_INTERNAL#include "zip.h"#include "crypt.h"#include "ttyio.h"#if CRYPT#ifndef FALSE#  define FALSE 0#endif#ifdef ZIP   /* For the encoding task used in Zip (and ZipCloak), we want to initialize      the crypt algorithm with some reasonably unpredictable bytes, see      the crypthead() function. The standard rand() library function is      used to supply these `random' bytes, which in turn is initialized by      a srand() call. The srand() function takes an "unsigned" (at least 16bit)      seed value as argument to determine the starting point of the rand()      pseudo-random number generator.      This seed number is constructed as "Seed = Seed1 .XOR. Seed2" with      Seed1 supplied by the current time (= "(unsigned)time()") and Seed2      as some (hopefully) nondeterministic bitmask. On many (most) systems,      we use some "process specific" number, as the PID or something similar,      but when nothing unpredictable is available, a fixed number may be      sufficient.      NOTE:      1.) This implementation requires the availability of the following          standard UNIX C runtime library functions: time(), rand(), srand().          On systems where some of them are missing, the environment that          incorporates the crypt routines must supply suitable replacement          functions.      2.) It is a very bad idea to use a second call to time() to set the          "Seed2" number! In this case, both "Seed1" and "Seed2" would be          (almost) identical, resulting in a (mostly) "zero" constant seed          number passed to srand().      The implementation environment defined in the "zip.h" header should      supply a reasonable definition for ZCR_SEED2 (an unsigned number; for      most implementations of rand() and srand(), only the lower 16 bits are      significant!). An example that works on many systems would be           "#define ZCR_SEED2  (unsigned)getpid()".      The default definition for ZCR_SEED2 supplied below should be regarded      as a fallback to allow successful compilation in "beta state"      environments.    */#  include <time.h>     /* time() function supplies first part of crypt seed */   /* "last resort" source for second part of crypt seed pattern */#  ifndef ZCR_SEED2#    define ZCR_SEED2 (unsigned)3141592654L     /* use PI as default pattern */#  endif#  ifdef GLOBAL         /* used in Amiga system headers, maybe others too */#    undef GLOBAL#  endif#  define GLOBAL(g) g#else /* !ZIP */#  define GLOBAL(g) G.g#endif /* ?ZIP */#ifdef UNZIP   /* char *key = (char *)NULL; moved to globals.h */#  ifndef FUNZIP     local int testp OF((__GPRO__ ZCONST uch *h));     local int testkey OF((__GPRO__ ZCONST uch *h, ZCONST char *key));#  endif#endif /* UNZIP */#ifndef UNZIP             /* moved to globals.h for UnZip */   local ulg keys[3];     /* keys defining the pseudo-random sequence */#endif /* !UNZIP */#ifndef Trace#  ifdef CRYPT_DEBUG#    define Trace(x) fprintf x#  else#    define Trace(x)#  endif#endif#ifndef CRC_32_TAB#  define CRC_32_TAB     crc_32_tab#endif#define CRC32(c, b) (CRC_32_TAB[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))/*********************************************************************** * Return the next byte in the pseudo-random sequence */int decrypt_byte(__G)    __GDEF{    unsigned temp;  /* POTENTIAL BUG:  temp*(temp^1) may overflow in an                     * unpredictable manner on 16-bit systems; not a problem                     * with any known compiler so far, though */    temp = ((unsigned)GLOBAL(keys[2]) & 0xffff) | 2;    return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);}/*********************************************************************** * Update the encryption keys with the next byte of plain text */int update_keys(__G__ c)    __GDEF    int c;                      /* byte of plain text */{    GLOBAL(keys[0]) = CRC32(GLOBAL(keys[0]), c);    GLOBAL(keys[1]) += GLOBAL(keys[0]) & 0xff;    GLOBAL(keys[1]) = GLOBAL(keys[1]) * 134775813L + 1;    {      register int keyshift = (int)(GLOBAL(keys[1]) >> 24);      GLOBAL(keys[2]) = CRC32(GLOBAL(keys[2]), keyshift);    }    return c;}/*********************************************************************** * Initialize the encryption keys and the random header according to * the given password. */void init_keys(__G__ passwd)    __GDEF    ZCONST char *passwd;        /* password string with which to modify keys */{    GLOBAL(keys[0]) = 305419896L;    GLOBAL(keys[1]) = 591751049L;    GLOBAL(keys[2]) = 878082192L;    while (*passwd != '\0') {        update_keys(__G__ (int)*passwd);        passwd++;    }}#ifdef ZIP/*********************************************************************** * Write encryption header to file zfile using the password passwd * and the cyclic redundancy check crc. */void crypthead(passwd, crc, zfile)    ZCONST char *passwd;         /* password string */    ulg crc;                     /* crc of file being encrypted */    FILE *zfile;                 /* where to write header */{    int n;                       /* index in random header */    int t;                       /* temporary */    int c;                       /* random byte */    int ztemp;                   /* temporary for zencoded value */    uch header[RAND_HEAD_LEN-2]; /* random header */    static unsigned calls = 0;   /* ensure different random header each time */    /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the     * output of rand() to get less predictability, since rand() is     * often poorly implemented.     */    if (++calls == 1) {        srand((unsigned)time(NULL) ^ ZCR_SEED2);    }    init_keys(passwd);    for (n = 0; n < RAND_HEAD_LEN-2; n++) {        c = (rand() >> 7) & 0xff;        header[n] = (uch)zencode(c, t);    }    /* Encrypt random header (last two bytes is high word of crc) */    init_keys(passwd);    for (n = 0; n < RAND_HEAD_LEN-2; n++) {        ztemp = zencode(header[n], t);        putc(ztemp, zfile);    }    ztemp = zencode((int)(crc >> 16) & 0xff, t);    putc(ztemp, zfile);    ztemp = zencode((int)(crc >> 24) & 0xff, t);    putc(ztemp, zfile);}#ifdef UTIL/*********************************************************************** * Encrypt the zip entry described by z from file source to file dest * using the password passwd.  Return an error code in the ZE_ class. */int zipcloak(z, source, dest, passwd)    struct zlist far *z;    /* zip entry to encrypt */    FILE *source, *dest;    /* source and destination files */    ZCONST char *passwd;    /* password string */{    int c;                  /* input byte */    int res;                /* result code */    ulg n;                  /* holds offset and counts size */    ush flag;               /* previous flags */    int t;                  /* temporary */    int ztemp;              /* temporary storage for zencode value */    /* Set encrypted bit, clear extended local header bit and write local       header to output file */    if ((n = (ulg)ftell(dest)) == (ulg)-1L) return ZE_TEMP;    z->off = n;    flag = z->flg;    z->flg |= 1,  z->flg &= ~8;    z->lflg |= 1, z->lflg &= ~8;    z->siz += RAND_HEAD_LEN;    if ((res = putlocal(z, dest)) != ZE_OK) return res;    /* Initialize keys with password and write random header */    crypthead(passwd, z->crc, dest);    /* Skip local header in input file */    if (fseek(source, (long)(4 + LOCHEAD + (ulg)z->nam + (ulg)z->ext),              SEEK_CUR)) {        return ferror(source) ? ZE_READ : ZE_EOF;    }    /* Encrypt data */    for (n = z->siz - RAND_HEAD_LEN; n; n--) {        if ((c = getc(source)) == EOF) {            return ferror(source) ? ZE_READ : ZE_EOF;        }        ztemp = zencode(c, t);        putc(ztemp, dest);    }    /* Skip extended local header in input file if there is one */    if ((flag & 8) != 0 && fseek(source, 16L, SEEK_CUR)) {        return ferror(source) ? ZE_READ : ZE_EOF;    }    if (fflush(dest) == EOF) return ZE_TEMP;    return ZE_OK;}/*********************************************************************** * Decrypt the zip entry described by z from file source to file dest * using the password passwd.  Return an error code in the ZE_ class. */int zipbare(z, source, dest, passwd)    struct zlist far *z;  /* zip entry to encrypt */    FILE *source, *dest;  /* source and destination files */    ZCONST char *passwd;  /* password string */{    int c0, c1;           /* last two input bytes */    ulg offset;           /* used for file offsets */    ulg size;             /* size of input data */    int r;                /* size of encryption header */    int res;              /* return code */    ush flag;             /* previous flags */    /* Save position and skip local header in input file */    if ((offset = (ulg)ftell(source)) == (ulg)-1L ||        fseek(source, (long)(4 + LOCHEAD + (ulg)z->nam + (ulg)z->ext),              SEEK_CUR)) {        return ferror(source) ? ZE_READ : ZE_EOF;    }    /* Initialize keys with password */    init_keys(passwd);    /* Decrypt encryption header, save last two bytes */    c1 = 0;    for (r = RAND_HEAD_LEN; r; r--) {        c0 = c1;        if ((c1 = getc(source)) == EOF) {            return ferror(source) ? ZE_READ : ZE_EOF;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av激情综合网| 成人丝袜视频网| 午夜成人免费电影| 99r精品视频| 日本一区二区三区免费乱视频| 亚洲成a人v欧美综合天堂| 国产iv一区二区三区| 日韩午夜电影在线观看| 国产欧美日韩中文久久| 日本色综合中文字幕| 欧美日韩mp4| 久久久亚洲精品石原莉奈| 久久精品免费看| 日韩欧美成人午夜| 欧美激情中文不卡| 一区二区三区丝袜| 91麻豆国产香蕉久久精品| 久久久久久久综合日本| 亚洲第一二三四区| 欧洲国内综合视频| 亚洲成人一二三| 91精品国产综合久久精品| 美女一区二区视频| 欧美在线免费播放| 首页欧美精品中文字幕| 日韩免费视频一区二区| 国产精品资源在线观看| 国产精品欧美久久久久一区二区| gogogo免费视频观看亚洲一| 欧美日韩一区久久| 久久不见久久见免费视频7| 2020国产精品久久精品美国| 国产成人在线色| 亚洲人成精品久久久久| 91精品1区2区| 一区二区成人在线| 欧美日韩国产小视频| 夜夜亚洲天天久久| 欧美日本在线视频| 捆绑变态av一区二区三区| 99久久99久久精品国产片果冻| 欧美国产国产综合| 91免费看视频| 一级日本不卡的影视| 欧美伊人精品成人久久综合97| 无码av中文一区二区三区桃花岛| 91精品综合久久久久久| 国产精品888| 亚洲va韩国va欧美va精品| 久久久一区二区| 欧美视频自拍偷拍| 国产精品资源网站| 亚洲成人免费影院| 中文字幕一区三区| 精品国产乱码久久久久久浪潮 | 欧美精品三级日韩久久| 精品一区二区免费看| 亚洲自拍与偷拍| 国产日韩欧美亚洲| 欧美日韩一区二区三区在线看| 捆绑调教美女网站视频一区| 伊人性伊人情综合网| 欧美三级乱人伦电影| 久久99精品国产.久久久久久 | 久久久99免费| 欧美丝袜自拍制服另类| 岛国一区二区在线观看| 日本免费在线视频不卡一不卡二| 亚洲丝袜精品丝袜在线| 精品日产卡一卡二卡麻豆| 在线免费观看一区| 99v久久综合狠狠综合久久| 久久99精品久久久久久久久久久久| 亚洲欧美日韩在线不卡| 国产欧美视频一区二区| 精品国产一区二区三区四区四| 欧美日韩久久久久久| 91亚洲大成网污www| 成人午夜在线播放| 国产剧情一区在线| 久草热8精品视频在线观看| 午夜精品在线看| 亚洲一二三四区| 国产欧美日本一区视频| 日韩一区二区三区视频在线观看| 99精品久久久久久| 国产精品综合av一区二区国产馆| 日本不卡免费在线视频| 亚洲第一会所有码转帖| 亚洲成人777| 亚洲一区二区欧美| 亚洲高清一区二区三区| 亚洲午夜激情网站| 一区二区免费在线播放| 国产色产综合色产在线视频 | 91免费观看在线| 成人免费高清在线| 丁香激情综合五月| 亚洲综合丁香婷婷六月香| 国产日韩欧美制服另类| 欧美日韩视频在线第一区| 欧美主播一区二区三区| 91麻豆免费在线观看| 高清在线成人网| 国产尤物一区二区在线| 亚洲一级二级在线| 久久婷婷综合激情| 2019国产精品| 色8久久精品久久久久久蜜| 国产凹凸在线观看一区二区| 美女国产一区二区三区| 免费的成人av| 韩国v欧美v日本v亚洲v| 成人av在线网| 欧美在线不卡一区| 欧美大片一区二区| 国产欧美综合在线观看第十页| 国产精品蜜臀av| 夜夜夜精品看看| 日韩精品乱码免费| 久久精品99国产国产精| 成人综合在线网站| 欧美亚洲尤物久久| 精品久久久三级丝袜| 国产精品福利电影一区二区三区四区| 亚洲欧美激情插| 精品一区二区三区蜜桃| 国产在线播放一区二区三区| 成年人午夜久久久| 欧美三级资源在线| 精品国产91久久久久久久妲己 | 欧美午夜影院一区| 欧美日韩视频在线一区二区| 精品国产一区二区三区久久久蜜月 | 精品国精品国产尤物美女| 国产精品伦一区| 亚洲一二三四在线| 美日韩一级片在线观看| 日本亚洲电影天堂| 久久99精品视频| 色狠狠综合天天综合综合| 日韩欧美黄色影院| 中文字幕精品三区| 中文字幕日韩一区| 日本美女一区二区| 91在线观看成人| 欧美精品一区二区三区在线| 一区二区三区成人| 高清在线观看日韩| 欧美一级专区免费大片| 夜夜爽夜夜爽精品视频| 国产不卡免费视频| 日韩欧美中文字幕制服| 日韩一区日韩二区| 激情综合五月天| 成人黄色av网站在线| 欧美精品一区二区三| 日韩在线一区二区三区| 91色视频在线| 中文欧美字幕免费| 国产自产v一区二区三区c| 欧美肥妇毛茸茸| 亚洲精品久久久蜜桃| 国产精品亚洲人在线观看| 91精品国产综合久久久久久| 亚洲日本在线天堂| 国产成人免费网站| 欧美一级高清片| 国产精品美女久久久久久久久久久| 激情av综合网| 日韩欧美三级在线| 日韩精品亚洲一区| 大陆成人av片| 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美精品xxxxbbbb| 国产欧美精品一区| 岛国av在线一区| 国产日韩精品一区二区浪潮av| 日本欧美一区二区| 欧美一区二区三区免费在线看| 亚洲第一精品在线| 欧美日高清视频| 日韩成人午夜电影| 91精品国产aⅴ一区二区| 视频在线观看一区| 欧美久久久一区| 日产国产欧美视频一区精品| 717成人午夜免费福利电影| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲一区日韩精品中文字幕| 欧美视频一区二区在线观看| 亚洲永久免费av| 宅男在线国产精品| 久草在线在线精品观看| 91精品麻豆日日躁夜夜躁| 国产在线国偷精品免费看| 国产欧美日韩激情| 91麻豆免费观看| 亚洲成人综合视频| 欧美亚洲动漫精品|