rsa_public_key.h 775 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef DEVICE_FIDO_RSA_PUBLIC_KEY_H_
  5. #define DEVICE_FIDO_RSA_PUBLIC_KEY_H_
  6. #include <stdint.h>
  7. #include <memory>
  8. #include <string>
  9. #include <vector>
  10. #include "base/component_export.h"
  11. #include "base/containers/span.h"
  12. #include "components/cbor/values.h"
  13. #include "device/fido/public_key.h"
  14. namespace device {
  15. class COMPONENT_EXPORT(DEVICE_FIDO) RSAPublicKey {
  16. public:
  17. static std::unique_ptr<PublicKey> ExtractFromCOSEKey(
  18. int32_t algorithm,
  19. base::span<const uint8_t> cbor_bytes,
  20. const cbor::Value::MapValue& map);
  21. };
  22. } // namespace device
  23. #endif // DEVICE_FIDO_RSA_PUBLIC_KEY_H_