oxigraph-main
Niko PLP 1 year ago
parent e393b5183a
commit 93c3369d39
  1. 9
      plugin/ippcp/test_linux/ippcp_example.cc
  2. 4
      plugin/ippcp/test_plain/ippcp_example.cc

@ -17,7 +17,7 @@
using namespace ROCKSDB_NAMESPACE;
std::string kDBPath = "/tmp/ipp_aes_example";
std::string kDBPath = "/tmp/ipp_aes_example_linux";
int main() {
DB* db;
@ -28,7 +28,6 @@ int main() {
Status status = EncryptionProvider::CreateFromString(
ConfigOptions(), IppcpProvider::kName(), &provider);
std::printf("ok\n");
assert(status.ok());
status =
@ -44,11 +43,9 @@ int main() {
printf("writing 1M records...");
WriteOptions w_opts;
for (int i = 0; i < 1000000; ++i) {
std::printf("ok.%d.",i);
status = db->Put(w_opts, std::to_string(i), std::to_string(i * i));
status = db->Put(w_opts, std::to_string(i), std::to_string(i));
assert(status.ok());
}
printf("flush");
db->Flush(FlushOptions());
printf("done.\n");
@ -58,7 +55,7 @@ int main() {
for (int i = 0; i < 1000000; ++i) {
status = db->Get(r_opts, std::to_string(i), &value);
assert(status.ok());
assert(value == std::to_string(i * i));
assert(value == std::to_string(i));
}
printf("done.\n");

@ -17,7 +17,7 @@
using namespace ROCKSDB_NAMESPACE;
std::string kDBPath = "/tmp/ipp_aes_example2";
std::string kDBPath = "/tmp/ipp_aes_example3";
int main() {
DB* db;
@ -32,6 +32,8 @@ int main() {
// status =
// provider->AddCipher("", "a6d2ae2816157e2b3c4fcf098815f7xb", 32, false);
// assert(status.ok());
// options.env = NewEncryptedEnv(Env::Default(), provider);
Status status = DB::Open(options, kDBPath, &db);
assert(status.ok());

Loading…
Cancel
Save