Classes | Functions | Variables
digest_test.cc File Reference
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <memory>
#include <vector>
#include <gtest/gtest.h>
#include <openssl/asn1.h>
#include <openssl/bytestring.h>
#include <openssl/crypto.h>
#include <openssl/digest.h>
#include <openssl/err.h>
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/nid.h>
#include <openssl/obj.h>
#include <openssl/sha.h>
#include "../internal.h"
#include "../test/test_util.h"
Include dependency graph for digest_test.cc:

Go to the source code of this file.

Classes

struct  DigestTestVector
 
struct  MD
 

Functions

static void CompareDigest (const DigestTestVector *test, const uint8_t *digest, size_t digest_len)
 
 TEST (DigestTest, ASN1)
 
 TEST (DigestTest, Getters)
 
 TEST (DigestTest, TestVectors)
 
 TEST (DigestTest, TransformBlocks)
 
static void TestDigest (const DigestTestVector *test)
 

Variables

static const MD blake2b256 = { "BLAKE2b-256", &EVP_blake2b256, nullptr }
 
static const DigestTestVector kTestVectors []
 
static const MD md4 = { "MD4", &EVP_md4, nullptr }
 
static const MD md5 = { "MD5", &EVP_md5, &MD5 }
 
static const MD md5_sha1 = { "MD5-SHA1", &EVP_md5_sha1, nullptr }
 
static const MD sha1 = { "SHA1", &EVP_sha1, &SHA1 }
 
static const MD sha224 = { "SHA224", &EVP_sha224, &SHA224 }
 
static const MD sha256 = { "SHA256", &EVP_sha256, &SHA256 }
 
static const MD sha384 = { "SHA384", &EVP_sha384, &SHA384 }
 
static const MD sha512 = { "SHA512", &EVP_sha512, &SHA512 }
 
static const MD sha512_256 = { "SHA512-256", &EVP_sha512_256, &SHA512_256 }
 

Function Documentation

◆ CompareDigest()

static void CompareDigest ( const DigestTestVector test,
const uint8_t digest,
size_t  digest_len 
)
static

Definition at line 155 of file digest_test.cc.

◆ TEST() [1/4]

TEST ( DigestTest  ,
ASN1   
)

Definition at line 279 of file digest_test.cc.

◆ TEST() [2/4]

TEST ( DigestTest  ,
Getters   
)

Definition at line 261 of file digest_test.cc.

◆ TEST() [3/4]

TEST ( DigestTest  ,
TestVectors   
)

Definition at line 254 of file digest_test.cc.

◆ TEST() [4/4]

TEST ( DigestTest  ,
TransformBlocks   
)

Definition at line 320 of file digest_test.cc.

◆ TestDigest()

static void TestDigest ( const DigestTestVector test)
static

Definition at line 162 of file digest_test.cc.

Variable Documentation

◆ blake2b256

const MD blake2b256 = { "BLAKE2b-256", &EVP_blake2b256, nullptr }
static

Definition at line 58 of file digest_test.cc.

◆ kTestVectors

const DigestTestVector kTestVectors[]
static

Definition at line 71 of file digest_test.cc.

◆ md4

const MD md4 = { "MD4", &EVP_md4, nullptr }
static

Definition at line 49 of file digest_test.cc.

◆ md5

const MD md5 = { "MD5", &EVP_md5, &MD5 }
static

Definition at line 50 of file digest_test.cc.

◆ md5_sha1

const MD md5_sha1 = { "MD5-SHA1", &EVP_md5_sha1, nullptr }
static

Definition at line 57 of file digest_test.cc.

◆ sha1

const MD sha1 = { "SHA1", &EVP_sha1, &SHA1 }
static

Definition at line 51 of file digest_test.cc.

◆ sha224

const MD sha224 = { "SHA224", &EVP_sha224, &SHA224 }
static

Definition at line 52 of file digest_test.cc.

◆ sha256

const MD sha256 = { "SHA256", &EVP_sha256, &SHA256 }
static

Definition at line 53 of file digest_test.cc.

◆ sha384

const MD sha384 = { "SHA384", &EVP_sha384, &SHA384 }
static

Definition at line 54 of file digest_test.cc.

◆ sha512

const MD sha512 = { "SHA512", &EVP_sha512, &SHA512 }
static

Definition at line 55 of file digest_test.cc.

◆ sha512_256

const MD sha512_256 = { "SHA512-256", &EVP_sha512_256, &SHA512_256 }
static

Definition at line 56 of file digest_test.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:10