Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/security/nss/lib/freebl/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 980 B image not shown  

Quelle  Hacl_Hash_SHA2_shim.h   Sprache: C

 
#include "blapi.h"
#include "../pqg.h"

static inline void
sha512_pre_msg(uint8_t *hash, uint8_t *prefix, uint32_t len, uint8_t *input)
{
    SHA512Context *ctx = SHA512_NewContext();
    uint32_t l = SHA512_LENGTH;
    SHA512_Begin(ctx);
    SHA512_Update(ctx, prefix, 32);
    SHA512_Update(ctx, input, len);
    SHA512_End(ctx, hash, &l, SHA512_LENGTH);
    SHA512_DestroyContext(ctx, PR_TRUE);
}

static inline void
sha512_pre_pre2_msg(
    uint8_t *hash,
    uint8_t *prefix,
    uint8_t *prefix2,
    uint32_t len,
    uint8_t *input)
{
    SHA512Context *ctx = SHA512_NewContext();
    uint32_t l = SHA512_LENGTH;
    SHA512_Begin(ctx);
    SHA512_Update(ctx, prefix, 32);
    SHA512_Update(ctx, prefix2, 32);
    SHA512_Update(ctx, input, len);
    SHA512_End(ctx, hash, &l, SHA512_LENGTH);
    SHA512_DestroyContext(ctx, PR_TRUE);
}

static void
Hacl_Streaming_SHA2_hash_512(uint8_t *secret, uint32_t len, uint8_t *expanded)
{
    SHA512_HashBuf(expanded, secret, len);
}

Messung V0.5
C=97 H=83 G=90

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.