#ifndef CHROMEOS_CROSAPI_CPP_KEYSTORE_SERVICE_UTIL_H_
#define CHROMEOS_CROSAPI_CPP_KEYSTORE_SERVICE_UTIL_H_
#include <optional>
#include "base/component_export.h"
#include "base/values.h"
#include "chromeos/crosapi/mojom/keystore_service.mojom.h"
namespace crosapi {
namespace keystore_service_util {
COMPONENT_EXPORT(CROSAPI)
extern const char kWebCryptoEcdsa[];
COMPONENT_EXPORT(CROSAPI)
extern const char kWebCryptoRsassaPkcs1v15[];
COMPONENT_EXPORT(CROSAPI)
extern const char kWebCryptoRsaOaep[];
COMPONENT_EXPORT(CROSAPI)
extern const char kWebCryptoNamedCurveP256[];
COMPONENT_EXPORT(CROSAPI)
std::optional<base::Value::Dict> MakeDictionaryFromKeystoreAlgorithm(
const mojom::KeystoreAlgorithmPtr& algorithm);
COMPONENT_EXPORT(CROSAPI)
std::optional<mojom::KeystoreAlgorithmPtr> MakeKeystoreAlgorithmFromDictionary(
const base::Value::Dict& dictionary);
COMPONENT_EXPORT(CROSAPI)
mojom::KeystoreAlgorithmPtr MakeRsassaPkcs1v15KeystoreAlgorithm(
unsigned int modulus_length,
bool sw_backed);
COMPONENT_EXPORT(CROSAPI)
mojom::KeystoreAlgorithmPtr MakeEcdsaKeystoreAlgorithm(
const std::string& named_curve);
COMPONENT_EXPORT(CROSAPI)
mojom::KeystoreAlgorithmPtr MakeRsaOaepKeystoreAlgorithm(
unsigned int modulus_length,
bool sw_backed);
}
}
#endif