Files
external_libcamera/include/libcamera/internal/pub_key.h
Kieran Bingham b71e8c2f39 libcamera/base: Move span to base library
Move span, and adjust the Doxygen exclusion as well.

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25 16:11:11 +01:00

39 lines
696 B
C++

/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2020, Google Inc.
*
* pub_key.h - Public key signature verification
*/
#ifndef __LIBCAMERA_INTERNAL_PUB_KEY_H__
#define __LIBCAMERA_INTERNAL_PUB_KEY_H__
#include <stdint.h>
#include <libcamera/base/span.h>
#if HAVE_GNUTLS
struct gnutls_pubkey_st;
#endif
namespace libcamera {
class PubKey
{
public:
PubKey(Span<const uint8_t> key);
~PubKey();
bool isValid() const { return valid_; }
bool verify(Span<const uint8_t> data, Span<const uint8_t> sig) const;
private:
bool valid_;
#if HAVE_GNUTLS
struct gnutls_pubkey_st *pubkey_;
#endif
};
} /* namespace libcamera */
#endif /* __LIBCAMERA_INTERNAL_PUB_KEY_H__ */