Uniot Core
0.8.1
Loading...
Searching...
No Matches
ICOSESigner.h
Go to the documentation of this file.
1/*
2 * This is a part of the Uniot project.
3 * Copyright (C) 2016-2023 Uniot <contact@uniot.io>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include <Bytes.h>
22
23#include "COSE.h"
24
25namespace uniot {
36 public:
40 virtual ~ICOSESigner() {}
41
47 virtual Bytes keyId() const = 0;
48
55 virtual Bytes sign(const Bytes &data) const = 0;
56
62 virtual COSEAlgorithm signerAlgorithm() const = 0;
63};
64
65} // namespace uniot
Definition Bytes.h:38
Interface for CBOR Object Signing and Encryption (COSE) signing operations.
Definition ICOSESigner.h:35
virtual Bytes sign(const Bytes &data) const =0
Signs the provided data using the implementation's cryptographic algorithm.
virtual COSEAlgorithm signerAlgorithm() const =0
Gets the COSE algorithm identifier used by this signer.
virtual Bytes keyId() const =0
Gets the key identifier used by this signer.
virtual ~ICOSESigner()
Virtual destructor to ensure proper cleanup of derived classes.
Definition ICOSESigner.h:40
COSEAlgorithm
Cryptographic algorithm identifiers for COSE.
Definition COSE.h:84
Contains all classes and functions related to the Uniot Core.