Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ / /
C ドライバー
/ /

使用中の暗号化

使用中の暗号化は、次の 2 つの機能で構成されています。

  • クライアントサイドのフィールド レベル暗号化

  • Queryable Encryption

C ドライバーで使用中の暗号化を使用するには、依存関係libmongocryptが必要です。 libmongocrypt のインストール手順については、MongoDB マニュアルを参照してください。

libmongocrypt がインストールされたら、使用中の暗号化を有効にするよう要求するように -DENABLE_CLIENT_SIDE_ENCRYPTION=ONを使用して C ドライバーを構成します。

$ cd mongo-c-driver
$ mkdir cmake-build && cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=ON ..
$ cmake --build . --target install

mongoc_client_encryption_t is used for explicit encryption and key management. mongoc_client_enable_auto_encryption and mongoc_client_pool_enable_auto_encryption is used to enable automatic encryption.

Queryable Encryption と CSFLE の機能は、一部の例外を除いて、同じ API の多くを共有します。

自動暗号化機能をサポートするには、次のいずれかの依存関係が必要です。

A mongoc_client_t or mongoc_client_pool_t configured with auto encryption will automatically try to load the crypt_shared library. If loading the crypt_shared library fails, the mongoc_client_t or mongoc_client_pool_t will try to spawn the mongocryptd process from the application's PATH. To configure use of crypt_shared and mongocryptd see mongoc_auto_encryption_opts_set_extra.

戻る

デバッグの支援