SSP21-CPP
IKeyLookup.h
1 
2 #ifndef SSP21_IKEYLOOKUP_H
3 #define SSP21_IKEYLOOKUP_H
4 
5 #include "ssp21/crypto/BufferTypes.h"
6 
7 #include <memory>
8 
9 namespace ssp21
10 {
11  /**
12  * Interface used to lookup a shared secret key using a key identifier
13  */
14  class IKeyLookup
15  {
16  public:
17 
18  virtual ~IKeyLookup() {}
19 
20  /**
21  * Try to find a key using an identifier
22  *
23  * @param key_id The key identifier if the key is a rotating key.
24  *
25  * @return a valid key, or nullptr if no key is available w/ the specified id
26  */
27  virtual std::shared_ptr<const SymmetricKey> find_and_consume_key(uint64_t key_id) = 0;
28  };
29 
30 
31 
32 
33 }
34 
35 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
virtual std::shared_ptr< const SymmetricKey > find_and_consume_key(uint64_t key_id)=0