#include "crypto/signature_creator.h"
#include <stddef.h>
#include <stdint.h>
#include "base/check.h"
#include "crypto/openssl_util.h"
#include "crypto/rsa_private_key.h"
#include "third_party/boringssl/src/include/openssl/evp.h"
#include "third_party/boringssl/src/include/openssl/rsa.h"
namespace crypto {
namespace {
const EVP_MD* ToOpenSSLDigest(SignatureCreator::HashAlgorithm hash_alg) { … }
int ToOpenSSLDigestType(SignatureCreator::HashAlgorithm hash_alg) { … }
}
SignatureCreator::~SignatureCreator() = default;
std::unique_ptr<SignatureCreator> SignatureCreator::Create(
RSAPrivateKey* key,
HashAlgorithm hash_alg) { … }
bool SignatureCreator::Sign(RSAPrivateKey* key,
HashAlgorithm hash_alg,
const uint8_t* data,
int data_len,
std::vector<uint8_t>* signature) { … }
bool SignatureCreator::Update(const uint8_t* data_part, int data_part_len) { … }
bool SignatureCreator::Final(std::vector<uint8_t>* signature) { … }
SignatureCreator::SignatureCreator() : … { … }
}