"Fossies" - the Fresh Open Source Software Archive

Member "src/Crypto/Streebog.h" (10 Oct 2018, 859 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Streebog.h" see the Fossies "Dox" file reference documentation.

    1 
    2 /*
    3 * Copyright (c) 2013, Alexey Degtyarev.
    4 * All rights reserved.
    5 */
    6 
    7 /* Adapted to VeraCrypt */
    8 
    9 #ifndef STREEBOG_H
   10 #define STREEBOG_H
   11 
   12 #include "Common/Tcdefs.h"
   13 #include "config.h"
   14 
   15 #ifdef __cplusplus
   16 extern "C" {
   17 #endif
   18 
   19 #define STREEBOG_ALIGN(a)   CRYPTOPP_ALIGN_DATA(a)
   20 
   21 typedef STREEBOG_ALIGN(16) struct _STREEBOG_CTX
   22 {
   23     STREEBOG_ALIGN(16) unsigned char buffer[64];
   24     STREEBOG_ALIGN(16) unsigned long long hash[8];
   25     STREEBOG_ALIGN(16) unsigned long long h[8];
   26     STREEBOG_ALIGN(16) unsigned long long N[8];
   27     STREEBOG_ALIGN(16) unsigned long long Sigma[8];
   28     size_t bufsize;
   29     unsigned int digest_size;
   30 } STREEBOG_CTX;
   31 
   32 void STREEBOG_init(STREEBOG_CTX *ctx);
   33 void STREEBOG_init256(STREEBOG_CTX *ctx);
   34 void STREEBOG_add(STREEBOG_CTX *ctx, const byte *msg, size_t len);
   35 void STREEBOG_finalize(STREEBOG_CTX *ctx, byte *out);
   36 
   37 #ifdef __cplusplus
   38 }
   39 #endif
   40 
   41 #endif