Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/sha256/nettle.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / sha256 / nettle.h` 31 lines ยท 703 bytes Raw Blame History 1 #ifndef SHA256_NETTLE_H 2 #define SHA256_NETTLE_H 3 4 #include 5 6 typedef struct sha256_ctx nettle_SHA256_CTX; 7 8 static inline void nettle_SHA256_Init(nettle_SHA256_CTX *ctx) 9 { 10 sha256_init(ctx); 11 } 12 13 static inline void nettle_SHA256_Update(nettle_SHA256_CTX *ctx, 14 const void *data, 15 size_t len) 16 { 17 sha256_update(ctx, len, data); 18 } 19 20 static inline void nettle_SHA256_Final(unsigned char *digest, 21 nettle_SHA256_CTX *ctx) 22 { 23 sha256_digest(ctx, SHA256_DIGEST_SIZE, digest); 24 } 25 26 #define platform_SHA256_CTX nettle_SHA256_CTX 27 #define platform_SHA256_Init nettle_SHA256_Init 28 #define platform_SHA256_Update nettle_SHA256_Update 29 #define platform_SHA256_Final nettle_SHA256_Final 30 31 #endif