MCPcopy
hub / github.com/scality/cloudserver / createDataKey

Method createDataKey

lib/kms/common.js:33–35  ·  view source on GitHub ↗

Creates data key to encrypt and decrypt the actual data (which data key is ciphered and deciphered by the appliance). The encrypted data key is stored in the object's metadata. We also use this function to create the bucket key for the file and in memory implementations. @return {buf

()

Source from the content-addressed store, hash-verified

31 @return {buffer} - random key
32 */
33 static createDataKey() {
34 return Buffer.from(crypto.randomBytes(this._keySize()));
35 }
36
37 /**
38 *

Callers 3

createCipherBundleMethod · 0.80
backend.jsFile · 0.80
backend.jsFile · 0.80

Calls 1

_keySizeMethod · 0.95

Tested by

no test coverage detected