# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- Crypto Hash Library

20 December, 2013

- 1
- 2
…
- 11
- 12
- 13
- 14
- 15
…
- 24
- 25

Returns
None.
Description
This routine finishes calculating an MD5 hash. It will automatically add the padding required by the hashing algorithm and
return the hash digest.
Remarks
None.
Preconditions
The hash context must be initialized with MD5_Initialize.
Example
uint8_t data[] = "Hello.";
MD5_CONTEXT context;
uint8_t digest[16];
MD5_Initialize (&context);
MD5_DataAdd (&context, data, 6);
MD5_Calculate (&context, digest);
Parameters
Parameters Description
context The context of the hash being calculated.
result A 16-byte buffer to store the calculated hash digest.
Function
void MD5_Calculate( MD5_CONTEXT* context, uint8_t* result);
1.6.2 SHA-1
This section describes the types and functions used for the SHA-1 crypto hash module.
Note that SHA-1
is not recommended
for new designs.
Functions
Name Description
SHA1_Initialize Initializes a SHA-1 context to perform a SHA-1 hash.
SHA1_DataAdd Adds data to a hash being calculated.
SHA1_Calculate Finishes calculating a hash.
Structures
Name Description
SHA1_CONTEXT Context storage for a hash operation
Description
1.6.2.1 SHA1_CONTEXT Structure
File
sha1.h
1.6 Library Interface MLA - Crypto Hash Library Help SHA-1
13
1

- 1
- 2
…
- 11
- 12
- 13
- 14
- 15
…
- 24
- 25