Storage Engine API
encryption_hooks.h
Go to the documentation of this file.
1 
30 #pragma once
31 
32 #include <memory>
33 #include <string>
34 
35 #include "mongo/base/disallow_copying.h"
36 #include "mongo/db/jsobj.h"
37 
38 namespace boost {
39 namespace filesystem {
40 class path;
41 } // namespace filesystem
42 } // namespace boost
43 
44 namespace mongo {
45 class DataProtector;
46 class ServiceContext;
47 
49 public:
50  static void set(ServiceContext* service, std::unique_ptr<EncryptionHooks> custHooks);
51 
52  static EncryptionHooks* get(ServiceContext* service);
53 
54  virtual ~EncryptionHooks();
55 
59  virtual bool enabled() const;
60 
67  virtual bool restartRequired();
68 
73  return 33;
74  }
75 
79  virtual std::unique_ptr<DataProtector> getDataProtector();
80 
84  virtual boost::filesystem::path getProtectedPathSuffix();
85 
89  virtual Status protectTmpData(
90  const uint8_t* in, size_t inLen, uint8_t* out, size_t outLen, size_t* resultLen);
91 
95  virtual Status unprotectTmpData(
96  const uint8_t* in, size_t inLen, uint8_t* out, size_t outLen, size_t* resultLen);
97 };
98 
99 } // namespace mongo
Copyright (C) 2017 MongoDB Inc.
Definition: encryption_hooks.h:38
size_t additionalBytesForProtectedBuffer()
Returns the maximum size addition when doing transforming temp data.
Definition: encryption_hooks.h:72
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
Definition: database_impl.cpp:956
ServiceContextNoop service
Definition: kv_engine_test_timestamps.cpp:203
Definition: encryption_hooks.h:48