• 请不要在回答技术问题时复制粘贴 AI 生成的内容
punk2sang
V2EX  ›  程序员

C++中 sha256 能取出一个 SHA256REF_CTX 类型的 context 的 state,在 Java 中有没有对应的包有这种功能的

  •  
  •   punk2sang · Dec 18, 2019 · 1424 views
    This topic created in 2363 days ago, the information mentioned may be changed or developed.
    SHA256REF_CTX *ctx = (SHA256REF_CTX*)ctxv;
    memcpy(state, ctx->state, 256);

    sha256_update(&ctx, data, size);
    sha256_final(&ctx, (uint8_t*)hash);
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   897 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:33 · PVG 06:33 · LAX 15:33 · JFK 18:33
    ♥ Do have faith in what you're doing.