#include "anonymous_tokens/cpp/crypto/rsa_blind_signer.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "anonymous_tokens/cpp/crypto/anonymous_tokens_pb_openssl_converters.h"
#include "anonymous_tokens/cpp/crypto/constants.h"
#include "anonymous_tokens/cpp/crypto/crypto_utils.h"
#include "anonymous_tokens/cpp/shared/status_utils.h"
#include "anonymous_tokens/proto/anonymous_tokens.pb.h"
#include <openssl/rsa.h>
namespace anonymous_tokens {
namespace {
absl::StatusOr<bssl::UniquePtr<RSA>> CreatePrivateKeyWithPublicMetadata(
const absl::string_view rsa_modulus_str,
const absl::string_view rsa_public_exponent_str,
const absl::string_view rsa_p_str, const absl::string_view rsa_q_str,
const absl::string_view rsa_crt_str,
const absl::string_view public_metadata,
const bool use_rsa_public_exponent) { … }
}
RsaBlindSigner::RsaBlindSigner(std::optional<absl::string_view> public_metadata,
bssl::UniquePtr<RSA> rsa_private_key)
: … { … }
absl::StatusOr<std::unique_ptr<RsaBlindSigner>> RsaBlindSigner::New(
const RSAPrivateKey& signing_key, const bool use_rsa_public_exponent,
std::optional<absl::string_view> public_metadata) { … }
absl::StatusOr<std::string> RsaBlindSigner::Sign(
const absl::string_view blinded_data) const { … }
}