MongoDB\Driver\ClientEncryption::createDataKey

(mongodb >=1.7.0)

MongoDB\Driver\ClientEncryption::createDataKeyCreate a new encryption data key

Beschreibung

final public MongoDB\Driver\ClientEncryption::createDataKey(string $kmsProvider, array $options = ?): MongoDB\BSON\Binary

Creates a new key document and inserts it into the key vault collection.

Parameter-Liste

kmsProvider

The KMS provider (e.g. "local", "aws", "azure", "gcp") that will be used to encrypt the new encryption key.

options

Data key options
Option Type Description
masterKey array

The masterKey identifies a KMS-specific key used to encrypt the new data key. This option is required unless kmsProvider is "local".

If kmsProvider is "aws", this option is required and has the following fields:

AWS masterKey options
Option Type Description
region string Required.
key string Required. The Amazon Resource Name (ARN) to the AWS customer master key (CMK).
endpoint string Optional. An alternate host identifier to send KMS requests to. May include port number.

If kmsProvider is "azure", this option is required and has the following fields:

Azure masterKey options
Option Type Description
keyVaultEndpoint string Required. Host with optional port (e.g. "example.vault.azure.net").
keyName string Required.
keyVersion string Optional. A specific version of the named key. Defaults to using the key's primary version.

If kmsProvider is "gcp", this option is required and has the following fields:

GCP masterKey options
Option Type Description
projectId string Required.
location string Required.
keyRing string Required.
keyName string Required.
keyVersion string Optional. A specific version of the named key. Defaults to using the key's primary version.
endpoint string Optional. Host with optional port. Defaults to "cloudkms.googleapis.com".

keyAltNames array

An optional list of string alternate names used to reference a key. If a key is created with alternate names, then encryption may refer to the key by the unique alternate name instead of by _id.

Rückgabewerte

Returns the identifier of the new key as a MongoDB\BSON\Binary object with subtype 4 (UUID).

Fehler/Exceptions

Changelog

Version Beschreibung
PECL mongodb 1.10.0 Azure and GCP are now supported as KMS providers for client-side encryption.

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Daten einer Abfrage mit Hilfe von Thumbnails nebeneinander ausgeben

Guten Tag zusammen, ich habe hier schon mal geschaut, bin aber Tatsache nicht schlau geworden. Ich möchte gerne Daten aus der DB abfragen und d ...

Geschrieben von Malchor am 17.05.2024 16:59:31
Forum: PHP Developer Forum
Buch über PHP, CSS und MySQL

As technology advances, so do the features of TPE sex dolls (https://www.bestrealdoll.com/collections/tpe-sex-dolls). Manufacturers now utilize st ...

Geschrieben von Nancyfrankflower am 17.05.2024 11:21:03
Forum: Bücher-Forum
Spielplan für 4 Gruppen zu je 6 Teams auf 2 Feldern

Hey, hallöchen! Du musst die Spiele so durchgehen, dass die Platzierung kontrolliert wechseln, dass jedes Team auf den Plätzen spielt. Hier ist ...

Geschrieben von Nico_Schubert am 14.05.2024 07:17:28
Forum: PHP Developer Forum
Bild drehen

Hallo, Du hast den Drehwinkel und den Pfad zum Bild bereits richtig im Post-Array. Hier ist ein vollständiges Beispiel, wie du das Bild drehst u ...

Geschrieben von Nico_Schubert am 14.05.2024 06:55:15
Forum: PHP Developer Forum