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

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

?? sha224type.c

?? IBE是一種非對稱密碼技術
?? C
字號:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
 */
#include "vibecrypto.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "algobj.h"
#include "digest.h"
#include "sha224.h"
#include "fipsmodule.h"
#include "errorctx.h"

/* Build the digestCtx that has a SHA224Ctx as the localCtx.
 * <p>This function will allocate space for the DigestClassCtx and the
 * 224Ctx. The caller must free that space (it will be one buffer).
 *
 * @param obj The object that will hold the context.
 * @param digestCtx The address where the function will deposit the
 * created ctx.
 * @return an int, 0 if the function completed successfully or a
 * non-zero error code.
 */
static int VOLT_CALLING_CONV BuildSHA224Ctx VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VoltDigestClassCtx **digestCtx
));

/* Implements VCtxDestroy.
 */
void VOLT_CALLING_CONV SHA224CtxDestroy VOLT_PROTO_LIST ((
   Pointer obj,
   Pointer ctx
));

int VtAlgorithmImplSHA224 (
   VtAlgorithmObject *object,
   Pointer info,
   unsigned int flag
   )
{
  int status;
  VoltAlgorithmObject *obj = (VoltAlgorithmObject *)(*object);
  VoltSHA224Ctx *ctx;
  VoltDigestClassCtx *digestCtx = (VoltDigestClassCtx *)0;
  VoltDigestClassCtx *sha256DigestCtx;
  VtItem newState;
  unsigned char initState[32] = { SHA224_INIT_DATA };
  VOLT_DECLARE_ERROR_TYPE (errorType)
  VOLT_DECLARE_FNCT_LINE (fnctLine)

  do
  {
    /* Check the flag, it should be VOLT_ALG_SET_TYPE_FLAG.
     */
    VOLT_SET_ERROR_TYPE (errorType, VT_ERROR_TYPE_PRIMARY)
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VT_ERROR_INVALID_TYPE;
    if (flag != VOLT_ALG_SET_TYPE_FLAG)
      break;

    /* The associated info should be a NULL pointer.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VT_ERROR_INVALID_ASSOCIATED_INFO;
    if (info != (Pointer)0)
      break;

    /* Build the DigestCtx and SHA-224 ctx.
     */
    VOLT_SET_ERROR_TYPE (errorType, 0)
    VOLT_SET_FNCT_LINE (fnctLine)
    status = BuildSHA224Ctx (obj, &digestCtx);
    if (status != 0)
      break;

    ctx = (VoltSHA224Ctx *)(digestCtx->localDigestCtx);

    /* Build the subordinate SHA-256 object.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VoltCreateObject (
      obj->voltObject.libraryCtx, (VoltObject **)&(ctx->sha256Obj),
      sizeof (VoltAlgorithmObject), VOLT_OBJECT_TYPE_ALGORITHM);
    if (status != 0)
      break;

    ctx->sha256Obj->state = VOLT_STATE_CREATE_ALG_OBJ;

    /* Set this object with the support Impl.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtAlgorithmImplSHA256 (
      (VtAlgorithmObject *)&(ctx->sha256Obj), (Pointer)0,
      VOLT_ALG_SET_TYPE_FLAG);
    if (status != 0)
      break;

    /* Reset the initial state.
     */
    VOLT_SET_ERROR_TYPE (errorType, 0)
    VOLT_SET_FNCT_LINE (fnctLine)
    newState.data = initState;
    newState.len = 32;
    status = VtSetAlgorithmParam (
      (VtAlgorithmObject)(ctx->sha256Obj), VtAlgorithmParamDigestInitialState,
      (Pointer)&newState);
    if (status != 0)
      break;

    /* Set the fields of the contexts.
     */
    sha256DigestCtx = (VoltDigestClassCtx *)(ctx->sha256Obj->classCtx);
    ctx->sha256Impl = sha256DigestCtx->algorithmImpl;
    ctx->sha256ImplInfo = sha256DigestCtx->algorithmImplInfo;
    digestCtx->algorithmImpl = VtAlgorithmImplSHA224;
    digestCtx->algorithmImplInfo = (Pointer)0;
    digestCtx->DigestInit = SHA224Init;
    digestCtx->DigestUpdate = SHA224Update;
    digestCtx->DigestFinal = SHA224Final;
    digestCtx->algorithm = VT_DIGEST_ALG_SHA224;
    digestCtx->digestSize = 28;
    digestCtx->blockLen = 64;
    /* Don't load a special localCtxDestroy, the DigestCtxDestroy will
     * take care of it.
     */

    obj->algClass = VOLT_CLASS_DIGEST;
    obj->classCtx = (Pointer)digestCtx;
    obj->ClassCtxDestroy = SHA224CtxDestroy;

  } while (0);

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

  /* If there was an error, destroy anything we created.
   */
  SHA224CtxDestroy ((Pointer)obj, (Pointer)digestCtx);

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

  return (status);
}

static int BuildSHA224Ctx (
   VoltAlgorithmObject *obj,
   VoltDigestClassCtx **digestCtx
   )
{
  int status;
#if VOLT_ALIGNMENT != 1
  unsigned int pad;
#endif
  unsigned int bufferSize, offset;
  unsigned char *buffer = (unsigned char *)0;
  VoltLibCtx *libCtx = (VoltLibCtx *)(obj->voltObject.libraryCtx);
  VoltDigestClassCtx *newDigestCtx;
  VoltSHA224Ctx *ctx;
  VOLT_DECLARE_FNCT_LINE (fnctLine)

  do
  {
    /* We want to allocate space for a digestCtx and a SHA224Ctx.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VT_ERROR_MEMORY;
    bufferSize = sizeof (VoltDigestClassCtx) + sizeof (VoltSHA224Ctx);
#if VOLT_ALIGNMENT != 1
    /* If the alignment is 1, there's no need to pad. If not, compute
     * the pad length.
     */
    VOLT_COMPUTE_ALIGN_PAD (VOLT_ALIGNMENT, sizeof (VoltDigestClassCtx), pad)
      bufferSize += pad;
#endif
    buffer = (unsigned char *)Z2Malloc (bufferSize, VOLT_MEMORY_SENSITIVE);
    if (buffer == (unsigned char *)0)
      break;
    Z2Memset (buffer, 0, bufferSize);

    /* Locate the contexts.
     */
    newDigestCtx = (VoltDigestClassCtx *)buffer;
    offset = sizeof (VoltDigestClassCtx);
#if VOLT_ALIGNMENT != 1
    offset += pad;
#endif
    ctx = (VoltSHA224Ctx *)(buffer + offset);

    /* Populate the contexts.
     */
    newDigestCtx->localDigestCtx = (Pointer)ctx;

    *digestCtx = newDigestCtx;

    status = 0;

  } while (0);

  /* If everything worked, return 0.
   */
  if (status == 0)
    return (0);

  /* If something went wrong, destroy anything we created and indicate
   * that this object is not usable.
   */
  if (buffer != (unsigned char *)0)
    Z2Free (buffer);

  obj->state = VOLT_STATE_ERROR;

  VOLT_LOG_ERROR_INFO_COMPARE (
    status, 0, obj, status, 0, VT_ERROR_TYPE_PRIMARY,
    (char *)0, "BuildSHA224Ctx", fnctLine, (char *)0)

  return (status);
}

void SHA224CtxDestroy (
   Pointer object,
   Pointer ctx
   )
{
  VoltAlgorithmObject *obj;
  VoltLibCtx *libCtx;
  VoltDigestClassCtx *digestCtx;
  VoltSHA224Ctx *sha224Ctx;

  if ( (object == (Pointer)0) || (ctx == (Pointer)0) )
    return;

  obj = (VoltAlgorithmObject *)object;
  libCtx = (VoltLibCtx *)(obj->voltObject.libraryCtx);
  digestCtx = (VoltDigestClassCtx *)ctx;
  sha224Ctx = (VoltSHA224Ctx *)(digestCtx->localDigestCtx);

  if (sha224Ctx->sha256Obj != (VoltAlgorithmObject *)0)
  {
    obj = sha224Ctx->sha256Obj;
    if (obj->ClassCtxDestroy != (VCtxDestroy)0)
      obj->ClassCtxDestroy ((Pointer)obj, obj->classCtx);
    if (obj->mpCtx != (VoltMpIntCtx *)0)
      VtDestroyMpIntCtx ((VtMpIntCtx *)&(obj->mpCtx));
    VoltDestroyObject ((VoltObject **)&(sha224Ctx->sha256Obj));
  }

  Z2Free (ctx);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品免费免费搜索 | 99久久久国产精品免费蜜臀| 一区二区三区日韩欧美精品| 欧美一区二区视频在线观看2020| 成人网在线播放| 麻豆91免费观看| 一级精品视频在线观看宜春院| 精品久久免费看| 欧美三级日韩三级国产三级| 99久久国产综合精品色伊| 激情综合色播激情啊| 午夜电影一区二区三区| 亚洲黄色录像片| 国产精品情趣视频| 久久蜜臀精品av| 欧美不卡一二三| 欧美精品免费视频| 在线亚洲精品福利网址导航| 成人午夜免费视频| 国产精品正在播放| 国内成人精品2018免费看| 色综合久久88色综合天天免费| 精品在线亚洲视频| 日本视频一区二区| 亚洲成人在线免费| 亚洲一区二区三区自拍| 亚洲免费在线播放| 国产精品美女久久久久aⅴ| 久久亚洲一区二区三区明星换脸 | 在线视频中文字幕一区二区| 成人影视亚洲图片在线| 国产麻豆成人传媒免费观看| 久久国产综合精品| 久久精品国产一区二区三| 日本亚洲电影天堂| 久久国产剧场电影| 麻豆专区一区二区三区四区五区| 秋霞av亚洲一区二区三| 日本欧洲一区二区| 六月丁香婷婷色狠狠久久| 免费观看30秒视频久久| 美美哒免费高清在线观看视频一区二区| 五月天精品一区二区三区| 天天综合网天天综合色| 日本不卡一区二区| 麻豆精品精品国产自在97香蕉| 免费在线观看一区| 国产美女在线精品| www.欧美日韩国产在线| 色哦色哦哦色天天综合| 欧美色精品天天在线观看视频| 欧美精品久久一区二区三区 | 亚洲丝袜制服诱惑| 一区二区三区色| 肉色丝袜一区二区| 久久99精品久久只有精品| 国产激情视频一区二区在线观看| 福利电影一区二区| 日本精品一区二区三区高清| 欧美日韩中文另类| 精品少妇一区二区三区视频免付费| 欧美精品一区二区三区在线 | 欧美成人精品1314www| 2020日本不卡一区二区视频| 国产欧美精品日韩区二区麻豆天美| 国产精品久久久久永久免费观看 | 91精品婷婷国产综合久久性色| www.欧美色图| 成a人片亚洲日本久久| 国产成人在线视频播放| 成人综合婷婷国产精品久久蜜臀| 99re这里只有精品首页| 精品亚洲成a人| 极品瑜伽女神91| 国产成人亚洲综合a∨婷婷 | 欧美成人a在线| 26uuu亚洲综合色| 亚洲精品中文在线| 日本不卡视频一二三区| 成人激情小说网站| 欧美电影在线免费观看| 中文字幕乱码亚洲精品一区| 亚洲成人黄色影院| 成人免费毛片app| 欧美人妖巨大在线| 国产精品国产三级国产aⅴ中文| 午夜亚洲福利老司机| 国产精华液一区二区三区| 欧美手机在线视频| 国产精品三级在线观看| 日韩黄色免费电影| 波多野结衣视频一区| 日韩视频一区二区三区在线播放| 综合网在线视频| 国模娜娜一区二区三区| 欧美区视频在线观看| 亚洲欧洲无码一区二区三区| 老司机一区二区| 色婷婷国产精品| 国产蜜臀97一区二区三区| 免费观看在线综合色| 色呦呦网站一区| 国产欧美日韩在线| 久久国产综合精品| 538prom精品视频线放| 亚洲另类中文字| 成人三级伦理片| 26uuu欧美日本| 蜜桃一区二区三区在线| 欧美伊人精品成人久久综合97| 国产精品美女久久久久久久网站| 国内外成人在线| 日韩精品一区二区三区在线观看| 亚洲一区二区精品视频| 91麻豆成人久久精品二区三区| 久久久不卡影院| 九九久久精品视频| 欧美一区二区三区性视频| 一区二区免费视频| 91国产免费观看| 亚洲欧美国产毛片在线| 99久久国产免费看| 亚洲欧美偷拍三级| 99久久伊人精品| 国产精品成人在线观看| 高潮精品一区videoshd| 中文字幕精品综合| 丁香激情综合国产| 国产欧美一区二区在线| 国产成人在线视频网址| 国产欧美一区视频| 成人黄色小视频| 亚洲欧洲另类国产综合| 99久久免费精品| 综合在线观看色| 欧美影院一区二区| 亚洲成a人片在线不卡一二三区| 欧美日韩国产片| 日本美女一区二区| 午夜一区二区三区在线观看| 欧美做爰猛烈大尺度电影无法无天| 中文字幕亚洲区| 色婷婷国产精品综合在线观看| 一区二区三区中文字幕| 欧美日韩精品一区二区三区四区 | 黄网站免费久久| 久久久99精品免费观看| 国产v综合v亚洲欧| 综合婷婷亚洲小说| 欧美性色综合网| 免费在线看一区| 久久久亚洲精品一区二区三区| 国产mv日韩mv欧美| 亚洲精品v日韩精品| 欧美日韩高清在线播放| 麻豆精品一区二区| 国产偷国产偷亚洲高清人白洁| 成人黄色电影在线| 一二三四区精品视频| 在线播放中文一区| 国产麻豆精品在线| 亚洲老司机在线| 91精品国产入口| 成人一道本在线| 亚洲国产欧美在线| 久久综合色婷婷| 91丝袜美腿高跟国产极品老师| 亚洲国产日韩a在线播放性色| 日韩精品一区二区在线观看| 成人午夜在线免费| 五月天激情小说综合| 久久免费视频一区| 在线免费观看日本一区| 日韩国产精品久久久久久亚洲| 国产无人区一区二区三区| 欧美三级资源在线| 国产成人免费在线观看不卡| 亚洲三级小视频| 欧美电影免费观看完整版| 国产suv一区二区三区88区| 午夜精品福利一区二区三区蜜桃| ww久久中文字幕| 欧美日韩一区二区电影| 成人免费视频播放| 日韩精品高清不卡| 成人免费小视频| 日韩一卡二卡三卡| 欧洲中文字幕精品| 国产成人av电影免费在线观看| 天堂午夜影视日韩欧美一区二区| 国产人伦精品一区二区| 在线不卡一区二区| 91啪在线观看| 国产91在线观看丝袜| 青青草国产精品97视觉盛宴 | 国产精品福利一区| 精品国产亚洲在线| 欧美视频一二三区| 成人h动漫精品一区二区| 激情另类小说区图片区视频区|