diff options
Diffstat (limited to 'chromium/device/fido/ed25519_public_key.h')
-rw-r--r-- | chromium/device/fido/ed25519_public_key.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chromium/device/fido/ed25519_public_key.h b/chromium/device/fido/ed25519_public_key.h new file mode 100644 index 00000000000..20ad4115d3e --- /dev/null +++ b/chromium/device/fido/ed25519_public_key.h @@ -0,0 +1,28 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef DEVICE_FIDO_ED25519_PUBLIC_KEY_H_ +#define DEVICE_FIDO_ED25519_PUBLIC_KEY_H_ + +#include <stdint.h> +#include <memory> + +#include "base/component_export.h" +#include "base/containers/span.h" +#include "components/cbor/values.h" +#include "device/fido/public_key.h" + +namespace device { + +class COMPONENT_EXPORT(DEVICE_FIDO) Ed25519PublicKey { + public: + static std::unique_ptr<PublicKey> ExtractFromCOSEKey( + int32_t algorithm, + base::span<const uint8_t> cbor_bytes, + const cbor::Value::MapValue& map); +}; + +} // namespace device + +#endif // DEVICE_FIDO_ED25519_PUBLIC_KEY_H_ |