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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? smwrite.c

?? IBE是一種非對稱密碼技術(shù)
?? C
?? 第 1 頁 / 共 4 頁
字號:
      obj->p7EnvelopedData, VtPkcs7ParamDataLen64,
      (Pointer)&(writeCtx->signedDataLen));
    if (status != 0)
      break;
#else
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtSetPkcs7Param (
      obj->p7EnvelopedData, VtPkcs7ParamDataLen,
      (Pointer)&(writeCtx->signedDataLen));
    if (status != 0)
      break;
#endif

    /* How big is the enveloped data going to be?
     */
#if VT_64_BIT_LENGTH == 64
    /* Call VtGetTotalOutputLen64 to determine how big the SignedData
     * will be.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtGetTotalOutputLen64 (
      (VtLibCtx)libCtx, VtGetOutputLen64ImplPkcs7,
      (Pointer)(obj->p7EnvelopedData), &(writeCtx->envelopedDataLen));
    if (status != 0)
      break;
#else
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtPkcs7WriteFinal (
      obj->p7EnvelopedData, random,
      (unsigned char *)0, (writeCtx->signedDataLen),
      (unsigned char *)0, 0, &(writeCtx->envelopedDataLen));
    if (status == 0)
      status = VT_ERROR_GENERAL;
    if (status != VT_ERROR_BUFFER_TOO_SMALL)
      break;
#endif

    /* How big will the encoded data be?
     */
    encodeDecodeSizeInfo.dataToProcess = (unsigned char *)0;
    encodeDecodeSizeInfo.dataToProcessLen =
      writeCtx->envelopedDataLen + preP7->len;
    VOLT_SET_FNCT_LINE (fnctLine)
    status = obj->GetEncodeDecodeSize (
      obj->base64, (VtRandomObject)0, VOLT_CALLER_ENCODE_FINAL,
      &encodeDecodeSizeInfo);
    writeCtx->base64Len = encodeDecodeSizeInfo.processedDataLen;

    if (status == 0)
      status = VT_ERROR_GENERAL;
    if (status != VT_ERROR_BUFFER_TOO_SMALL)
      break;

    /* If this is ZDM, we may need to add padding.
     */
    if ((obj->formatType & VOLT_MESSAGE_FORMAT_ZDM) != 0)
    {
#if VT_64_BIT_LENGTH == 64
      numHi = (UInt32)(writeCtx->base64Len >> 32);
      numLo = (UInt32)(writeCtx->base64Len);
#else
      numHi = (UInt32)0;
      numLo = (UInt32)(writeCtx->base64Len);
#endif
      VOLT_SET_FNCT_LINE (fnctLine)
      status = VoltAddZDMPad (obj, writeCtx, numLo, numHi);
      if (status != 0)
        break;
    }

#if VT_64_BIT_LENGTH == 64
    /* If 64-bit lengths, set the outputLen64 in case we need it.
     */
    obj->outputLen64 =
      writeCtx->base64Len + (VtUInt64)writeCtx->prelimLen +
      (VtUInt64)(writeCtx->trailLen);
#endif

    status = 0;
    obj->state = VOLT_SECURE_MAIL_STATE_WRITE_INIT_LEN;

  } while (0);

  if (asciiNum != (char *)0)
    Z2Free (asciiNum);

  VOLT_LOG_ERROR_INFO_COMPARE (
    status, 0, obj, status, 0, errorType,
    (char *)0, "SetTotalLengths", fnctLine, (char *)0)

  return (status);
}

int ConvertNumToAsciiAlloc (
   VoltLibCtx *libCtx,
   UInt32 theNumLo,
   UInt32 theNumHi,
   char **asciiNum,
   unsigned int *asciiNumLen
   )
{
  unsigned int places, index;
#if VT_64_BIT_LENGTH == 64
  VtUInt64 theNum, radix, value, current;
#else
  UInt32 theNum, radix, value, current;
#endif
  char *buffer = (unsigned char *)0;
  VOLT_DECLARE_FNCT_LINE (fnctLine)

  *asciiNum = (char *)0;

#if VT_64_BIT_LENGTH == 64
  theNum = (VtUInt64)theNumHi;
  theNum <<= 32;
  theNum += (VtUInt64)theNumLo;
#else
  theNum = theNumLo;
#endif

  /* First, count the size.
   */
  radix = 10;
  places = 1;
  while (theNum >= radix)
  {
    places++;
    radix *= 10;
  }

  /* Allocate the buffer to hold the result.
   */
  VOLT_SET_FNCT_LINE (fnctLine)
  buffer = (char *)Z2Malloc (places + 1, 0);
  if (buffer != (char *)0)
  {
    Z2Memset ((Pointer)buffer, 0x30, places);
    buffer[places] = 0;

    value = theNum;
    index = places - 1;
    do
    {
      current = value % 10;
      buffer[index] |= (char)current;
      value -= current;
      value = value / 10;
      index--;
    } while (value != 0);

    *asciiNum = buffer;
    *asciiNumLen = places;

    return (0);
  }

  VOLT_LOG_ERROR_INFO (
    libCtx, 0, VT_ERROR_MEMORY, 0, VT_ERROR_TYPE_PRIMARY,
    (char *)0, "ConvertNumToAsciiAlloc", fnctLine, (char *)0)

  return (VT_ERROR_MEMORY);
}

static int AppendToVtItem (
   VoltLibCtx *libCtx,
   unsigned char *dataToAppend,
   unsigned int dataToAppendLen,
   unsigned char *trailingCharacters,
   unsigned int trailingCharactersLen,
   VtItem *theItem
   )
{
  int status;
  unsigned int totalLen;
  unsigned char *newBuffer = (unsigned char *)0;
  VOLT_DECLARE_FNCT_LINE (fnctLine)

  do
  {
    /* Allocate space for old an new.
     */
    totalLen = 0;
    if (theItem->data != (unsigned char *)0)
      totalLen = theItem->len;

    totalLen += dataToAppendLen + trailingCharactersLen;

    VOLT_SET_FNCT_LINE (fnctLine)
    status = VT_ERROR_MEMORY;
    newBuffer = (unsigned char *)Z2Malloc (totalLen, VOLT_MEMORY_SENSITIVE);
    if (newBuffer == (unsigned char *)0)
      break;

    /* Copy the old into the new.
     */
    Z2Memcpy (newBuffer, theItem->data, theItem->len);

    /* Copy the new.
     */
    Z2Memcpy (newBuffer + theItem->len, dataToAppend, dataToAppendLen);

    /* Any trailing characters?
     */
    Z2Memcpy (
      newBuffer + theItem->len + dataToAppendLen, trailingCharacters,
      trailingCharactersLen);

    /* Free the old.
     */
    Z2Free (theItem->data);

    /* Set theItem with the new.
     */
    theItem->data = newBuffer;
    theItem->len = totalLen;

    status = 0;

  } while (0);

  /* If no errors, we're done.
   */
  if (status == 0)
    return (0);

  /* If error, free up what we allocated.
   */
  if (newBuffer != (unsigned char *)0)
    Z2Free (newBuffer);

  VOLT_LOG_ERROR_INFO (
    libCtx, 0, status, 0, VT_ERROR_TYPE_PRIMARY,
    (char *)0, "AppendToVtItem", fnctLine, (char *)0)

  return (status);
}

#define ZDM_REQUIRED_LEN    4096
#define ZDM_SEARCH_PATTERN  "\">"
#define ONE_LINE_LEN        64

int VoltAddZDMPad (
   VoltSecureMailObject *obj,
   VoltSecureMailWriteCtx *writeCtx,
   UInt32 numLo,
   UInt32 numHi
   )
{
  int status;
  unsigned int startLen, endLen, extraLen, totalLen, newLen, lineCount;
  unsigned int index, leftovers, offset;
  unsigned int messageLen;
  VoltLibCtx *libCtx = (VoltLibCtx *)(obj->voltObject.libraryCtx);
  char *start, *end;
  unsigned char *buffer = (unsigned char *)0;
  unsigned char oneLine[ONE_LINE_LEN];
  VOLT_DECLARE_FNCT_LINE (fnctLine)

  do
  {
    /* If messageLen is already > ZDM_REQUIRED_LEN, no need to go
     * further.
     */
    status = 0;
    if (numHi != (UInt32)0)
      break;
    if (numLo >= ZDM_REQUIRED_LEN)
      break;

    messageLen = (unsigned int)numLo;

    /* In writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG] is the place
     * where we stop counting towards the ZDM_REQUIRED_LEN. Find that
     * place.
     * Don't use Strstr because this buffer is not necessarily
     * NULL-terminated.
     */
    start = (char *)(writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].data);
    end = start;
    offset = 0;
    /* Set newLen to a max. If we search this many bytes, we didn't
     * find the target and we won't, so stop looking.
     */
    newLen = writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].len - 1;
    do
    {
      if (end[0] == '"')
      {
        if (end[1] == '>')
          break;
      }
      offset++;
      end++;

      /* If we haven't looked through the entire buffer, keep looking.
       * If there's no more buffer to search, stop looking, the answer
       * is NULL, which will later trigger an error.
       */
      if (offset < newLen)
        continue;

      end = (char *)0;
      break;

    } while (1);

    /* If we didn't find the location, it wasn't there, something's
     * wrong.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VT_ERROR_INVALID_INPUT;
    if (end == (char *)0)
      break;

    startLen = (unsigned int)end - (unsigned int)start;
    endLen = writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].len - startLen;
    /* Any bytes up to the target are counted toward the
     * ZDM_REQUIRED_LEN.
     */
    totalLen = startLen;
    /* The BEGIN MESSAGE, BEGIN BLOCK, and END BLOCK are included in
     * the ZDM_REQUIRED_LEN, if they exist.
     */
    totalLen += writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_BLK].len;
    totalLen += writeCtx->itemArray[VOLT_WRITE_SM_ITEM_BEGIN_BLK].len;
    totalLen += writeCtx->itemArray[VOLT_WRITE_SM_ITEM_HEADER].len;
    /* Finally, add the message length.
     */
    totalLen += messageLen;

    /* If there are at least ZDM_REQUIRED_LEN bytes, no need to pad,
     * we're done.
     */
    status = 0;
    if (totalLen >= ZDM_REQUIRED_LEN)
      break;

    /* How many pad bytes do we need?
     */
    extraLen = ZDM_REQUIRED_LEN - totalLen;

    /* We're going to add a series of lines, each line consisting of a
     * series of spaces, followed by new line character(s). First,
     * build a line with the appropriate new line character. The total
     * length of the line will be ONE_LINE_LEN.
     */
    Z2Memset (oneLine, ' ', ONE_LINE_LEN);
    Z2Memcpy (
      oneLine + ONE_LINE_LEN -
      writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].len,
      writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].data,
      writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].len);

    /* How many full lines do we add? How many leftovers after we have
     * printed out a bunch of lines?
     */
    lineCount = extraLen / ONE_LINE_LEN;
    leftovers = extraLen - (lineCount * ONE_LINE_LEN);

    /* Allocate a buffer to hold the contents of the data in
     * itemArray[VOLT_WRITE_SM_ITEM_END_MSG] along with the new lines.
     * The new data will be placed into the middle of the buffer, which
     * is why we don't do a Realloc (although we could with a Memmove,
     * but choose not to for efficiency).
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VT_ERROR_MEMORY;
    newLen = writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].len + extraLen;
    buffer = (unsigned char *)Z2Malloc (newLen + 1, 0);
    if (buffer == (unsigned char *)0)
      break;

    Z2Memcpy (
      buffer, writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].data, startLen);
    offset = startLen;
    for (index = 0; index < lineCount; ++index)
    {
      Z2Memcpy (buffer + offset, oneLine, ONE_LINE_LEN);
      offset += ONE_LINE_LEN;
    }
    /* Print out leftovers. Get rid of the new line characters in case
     * leftovers is ONE_LINE_LEN - 1 and newLineChar length is 2.
     */
    Z2Memset (
      oneLine + ONE_LINE_LEN -
      writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].len, ' ',
      writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].len);
    Z2Memcpy (buffer + offset, oneLine, leftovers);
    offset += leftovers;
    Z2Memcpy (
      buffer + offset,
      writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].data + startLen, endLen);
    buffer[newLen] = 0;

    /* Free the old buffer.
     */
    Z2Free (writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].data);
    /* Replace it with the new.
     */
    writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].data = buffer;
    writeCtx->itemArray[VOLT_WRITE_SM_ITEM_END_MSG].len = newLen;
    writeCtx->trailLen += extraLen;

    status = 0;

  } while (0);

  if (status == 0)
    return (0);

  /* If there was an error, free the buffer we would have returned, but
   * didn't.
   */
  if (buffer != (unsigned char *)0)
    Z2Free (buffer);

  VOLT_LOG_ERROR_INFO (
    0, obj, status, 0, VT_ERROR_TYPE_PRIMARY,
    (char *)0, "VoltAddZDMPad", fnctLine, (char *)0)

  return (status);
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人美女视频在线观看18| 国产精品麻豆网站| 国产精品污www在线观看| 中文字幕在线一区免费| 亚洲电影视频在线| 韩国精品主播一区二区在线观看| 成人深夜在线观看| 欧美欧美欧美欧美| 久久精品男人天堂av| 亚洲视频综合在线| 免费不卡在线观看| av在线不卡电影| 4438成人网| 国产精品视频一区二区三区不卡| 亚洲精品一卡二卡| 精品一区二区三区日韩| 91高清在线观看| 久久亚洲欧美国产精品乐播 | 蜜桃在线一区二区三区| 国产盗摄一区二区| 欧美嫩在线观看| 国产精品国产三级国产普通话99 | 久久精品一区四区| 夜夜精品浪潮av一区二区三区| 久久69国产一区二区蜜臀| 91丨九色丨黑人外教| 日韩欧美你懂的| 亚洲精品第一国产综合野| 国产乱一区二区| 欧美精品久久99久久在免费线| 国产精品色在线观看| 天天影视涩香欲综合网| jlzzjlzz国产精品久久| 精品国产污网站| 亚洲地区一二三色| proumb性欧美在线观看| 日韩一区二区在线免费观看| 日韩美女精品在线| 国产呦精品一区二区三区网站| 在线观看免费视频综合| 国产蜜臀av在线一区二区三区| 亚洲成人777| 91在线小视频| 久久美女艺术照精彩视频福利播放 | 亚洲国产精品久久久男人的天堂| 国产成人在线看| 日韩亚洲欧美高清| 亚洲一区中文日韩| 99久久精品免费观看| 国产日韩欧美a| 国内精品久久久久影院色| 日韩一区二区免费视频| 欧美日韩国产精选| 亚洲在线免费播放| 色系网站成人免费| 综合久久久久久| 成人国产视频在线观看| 国产亚洲成av人在线观看导航| 免费成人美女在线观看.| 在线播放中文字幕一区| 亚洲bt欧美bt精品| 91福利在线观看| 一区二区三区日韩欧美精品| 99精品欧美一区二区三区综合在线| 国产日韩精品一区| 国产不卡视频在线播放| 久久久.com| 国产白丝精品91爽爽久久| 国产亚洲一二三区| 国产传媒一区在线| 国产欧美精品国产国产专区| 国产成人精品影视| 国产日韩欧美综合一区| 国产jizzjizz一区二区| 欧美激情一区不卡| 成人性生交大片免费看中文网站| 久久久不卡网国产精品二区| 国产麻豆91精品| 国产日韩欧美综合在线| 成人免费观看视频| 亚洲精品成人在线| 欧美日韩免费一区二区三区视频| 亚洲一区视频在线观看视频| 欧美视频在线一区二区三区| 丝袜美腿成人在线| 日韩欧美中文字幕制服| 极品少妇xxxx精品少妇| 久久久久久黄色| 不卡在线观看av| 亚洲猫色日本管| 欧美日本在线一区| 日本不卡视频在线| 久久影院午夜论| 99久久精品免费看国产免费软件| 一区二区三区四区在线播放| 欧美日韩美女一区二区| 久久国产精品区| 国产人伦精品一区二区| 色婷婷综合久久久久中文一区二区 | 国产精品77777| 成人欧美一区二区三区白人| 欧洲日韩一区二区三区| 日韩专区一卡二卡| 久久久久久久久岛国免费| www..com久久爱| 婷婷夜色潮精品综合在线| 精品理论电影在线观看| 成人免费毛片嘿嘿连载视频| 夜色激情一区二区| 精品日韩欧美在线| 99久久精品免费看国产| 日本大胆欧美人术艺术动态| 久久精品人人做人人综合| 色噜噜狠狠色综合中国| 日本美女一区二区三区视频| 日本一区二区三区在线不卡| 在线观看av不卡| 国产一区二区在线看| 亚洲免费伊人电影| 欧美va亚洲va| 色噜噜久久综合| 国产盗摄一区二区| 五月综合激情网| 亚洲国产精品激情在线观看| 欧美色综合网站| 国产精品一区二区久激情瑜伽| 亚洲综合色视频| 久久久久久久综合色一本| 色哦色哦哦色天天综合| 免费日本视频一区| 国产欧美一区二区精品性| 盗摄精品av一区二区三区| 日韩欧美亚洲一区二区| 久久九九全国免费| 日一区二区三区| 国产成人免费在线观看| 欧美日韩在线播放一区| 久久你懂得1024| 青青青爽久久午夜综合久久午夜| 国产宾馆实践打屁股91| 国产日韩欧美高清| 日韩一区二区三免费高清| 91在线精品秘密一区二区| 捆绑紧缚一区二区三区视频| 亚洲尤物在线视频观看| 久久看人人爽人人| 欧美一区二区三区小说| 色综合天天综合网天天看片| 国产成人亚洲综合a∨婷婷 | 国产成人精品午夜视频免费| 天堂影院一区二区| 自拍偷拍亚洲综合| 久久久久9999亚洲精品| 日韩视频在线永久播放| 欧美揉bbbbb揉bbbbb| a4yy欧美一区二区三区| 午夜精品久久久久久不卡8050| 亚洲色图视频免费播放| 亚洲精品一区二区三区影院| 欧美精品一二三区| 欧洲精品一区二区| 99r国产精品| 风间由美一区二区三区在线观看 | 日本道在线观看一区二区| a在线播放不卡| 懂色av一区二区三区蜜臀| 激情综合网激情| 蜜臀a∨国产成人精品| 丝袜美腿亚洲一区| 日日骚欧美日韩| 婷婷久久综合九色国产成人 | 欧美日产国产精品| 欧美三级日韩三级国产三级| 91成人在线精品| 91国产丝袜在线播放| 色综合视频在线观看| 91蜜桃网址入口| 99re这里只有精品首页| 99国产欧美久久久精品| 成人18视频在线播放| av一本久道久久综合久久鬼色| 粉嫩蜜臀av国产精品网站| 国产精品亚洲人在线观看| 国产麻豆精品在线观看| 国产制服丝袜一区| 国产一区二区h| 东方欧美亚洲色图在线| 成人在线视频一区二区| 成人性生交大片免费看在线播放| 成人免费视频国产在线观看| 国产成人免费xxxxxxxx| 不卡av在线网| 91在线播放网址| 91福利国产精品| 91精品国产综合久久久久久| 欧美一二区视频| 久久久久久久精| 中文字幕中文乱码欧美一区二区| 亚洲色图色小说| 亚洲福利一区二区|