VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/libzip/zip_add.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-27 15:40:38 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-27 15:40:38 +0200
commit9836fdccd995b9a2759329f9568990dafd63d774 (patch)
tree1df808c3e7f2da317dd53e61c40d01357e9ee218 /src/Common/libzip/zip_add.c
parent72fa43662cf084586b5b5cf767cbcd13ca949c82 (diff)
downloadVeraCrypt-9836fdccd995b9a2759329f9568990dafd63d774.tar.gz
VeraCrypt-9836fdccd995b9a2759329f9568990dafd63d774.zip
Translations: Add new messages to XML files where it was missing
Diffstat (limited to 'src/Common/libzip/zip_add.c')
0 files changed, 0 insertions, 0 deletions
tribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright (c) 2013-2017 IDRIX
 * Governed by the Apache License 2.0 the full text of which is contained
 * in the file License.txt included in VeraCrypt binary and source
 * code distribution packages.
 */

#ifndef _SHA2_H
#define _SHA2_H

#include "Common/Tcdefs.h"
#include "Common/Endian.h"
#include "Crypto/config.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define SHA256_DIGEST_SIZE  32
#define SHA256_BLOCK_SIZE   64

#define SHA512_DIGEST_SIZE  64
#define SHA512_BLOCK_SIZE  128

#if CRYPTOPP_BOOL_X64
#define SHA2_ALIGN	CRYPTOPP_ALIGN_DATA(32)
#else
#define SHA2_ALIGN	CRYPTOPP_ALIGN_DATA(16)
#endif

typedef struct
{   uint_64t count[2];
    SHA2_ALIGN uint_64t hash[8];
    SHA2_ALIGN uint_64t wbuf[16];
} sha512_ctx;

typedef struct
{   uint_32t count[2];
    SHA2_ALIGN uint_32t hash[8];
    SHA2_ALIGN uint_32t wbuf[16];
} sha256_ctx;


void sha512_begin(sha512_ctx* ctx);
void sha512_hash(const unsigned char * source, uint_64t sourceLen, sha512_ctx *ctx);
void sha512_end(unsigned char * result, sha512_ctx* ctx);
void sha512(unsigned char * result, const unsigned char* source, uint_64t sourceLen);

void sha256_begin(sha256_ctx* ctx);
void sha256_hash(const unsigned char * source, uint_32t sourceLen, sha256_ctx *ctx);
void sha256_end(unsigned char * result, sha256_ctx* ctx);
void sha256(unsigned char * result, const unsigned char* source, uint_32t sourceLen);

#if defined(__cplusplus)
}
#endif



#endif