chromium/third_party/skia/src/core/SkMD5.cpp

/*
 * Copyright 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * The following code is based on the description in RFC 1321.
 * http://www.ietf.org/rfc/rfc1321.txt
 */

//The following macros can be defined to affect the MD5 code generated.
//SK_MD5_CLEAR_DATA causes all intermediate state to be overwritten with 0's.
//SK_CPU_LENDIAN allows 32 bit <=> 8 bit conversions without copies (if alligned).
//SK_CPU_FAST_UNALIGNED_ACCESS allows 32 bit <=> 8 bit conversions without copies if SK_CPU_LENDIAN.

#include "src/base/SkUtils.h"
#include "src/core/SkMD5.h"

#include "include/private/base/SkFeatures.h"
#include "include/private/base/SkMalloc.h"

/** MD5 basic transformation. Transforms state based on block. */
static void transform(uint32_t state[4], const uint8_t block[64]);

/** Encodes input into output (4 little endian 32 bit values). */
static void encode(uint8_t output[16], const uint32_t input[4]);

/** Encodes input into output (little endian 64 bit value). */
static void encode(uint8_t output[8], const uint64_t input);

/** Decodes input (4 little endian 32 bit values) into storage, if required. */
static const uint32_t* decode(uint32_t storage[16], const uint8_t input[64]);

SkMD5::SkMD5() :{}

bool SkMD5::write(const void* buf, size_t inputLength) {}

SkMD5::Digest SkMD5::finish() {}

static SkString to_hex_string(const uint8_t* data, const char* hexDigits) {}

SkString SkMD5::Digest::toHexString() const {}

SkString SkMD5::Digest::toLowercaseHexString() const {}

struct F {};

struct G {};

struct H {};

struct I {};

/** Rotates x left n bits. */
static inline uint32_t rotate_left(uint32_t x, uint8_t n) {}

template <typename T>
static inline void operation(T operation, uint32_t& a, uint32_t b, uint32_t c, uint32_t d,
                             uint32_t x, uint8_t s, uint32_t t) {}

static void transform(uint32_t state[4], const uint8_t block[64]) {}

static void encode(uint8_t output[16], const uint32_t input[4]) {}

static void encode(uint8_t output[8], const uint64_t input) {}

static inline bool is_aligned(const void *pointer, size_t byte_count) {}

static const uint32_t* decode(uint32_t storage[16], const uint8_t input[64]) {}