Files
lib3mf/Include/Common/NMR_SecureContext.h
SaraP f8c998f6ff lib3mf :
- primo commit.
2021-09-07 16:50:23 +02:00

35 lines
863 B
C++

#ifndef NMR_SECURECONTEXT
#define NMR_SECURECONTEXT
#include <map>
#include <string>
#include "Common/NMR_SecureContentTypes.h"
namespace NMR {
using ClientConsumerMap = std::map<std::string, KeyWrappingDescriptor>;
class CSecureContext {
private:
ClientConsumerMap m_ConsumerMap;
ContentEncryptionDescriptor m_sDekDescriptor;
bool m_bHasDek = false;
public:
bool hasDekCtx() const;
ContentEncryptionDescriptor getDekCtx() const;
void setDekCtx(ContentEncryptionDescriptor const & descriptor);
ClientConsumerMap::const_iterator kekCtxBegin() const;
ClientConsumerMap::const_iterator kekCtxEnd() const;
void addKekCtx(std::string const & consumerId, KeyWrappingDescriptor const & descriptor);
KeyWrappingDescriptor getKekCtx(std::string const & consumerId) const;
bool emptyKekCtx() const;
};
}
#endif // !NMR_SECURECONTEXT