static bucketLevelEncryption(bucket, sseConfig, log, cb) {
        /*
        The purpose of bucket level encryption is so that the client does not
        have to send appropriate headers to trigger encryption on each object
        put in an "encrypted bucket". Customer provided keys are not
        feasible in this system because we do not want to store this key
        in the bucket metadata.
        */
        const { algorithm, configuredMasterKeyId, mandatory } = sseConfig;
        const _mandatory = mandatory === true;
        if (algorithm === 'AES256' || algorithm === 'aws:kms') {
            const serverSideEncryptionInfo = {
                cryptoScheme: 1,
                algorithm,
                mandatory: _mandatory,
            };

            if (algorithm === 'aws:kms' && configuredMasterKeyId) {
                // If input key is scality arn format it needs validation
                // otherwise prepend the current KMS client arnPrefix
                if (isScalityKmsArn(configuredMasterKeyId)) {
                    const detail = extractDetailFromArn(configuredMasterKeyId);
                    const error = validateKeyDetail(detail, availableBackends);
                    if (error) {
                        return cb(error);
                    }
                    serverSideEncryptionInfo.configuredMasterKeyId = configuredMasterKeyId;
                } else {
                    serverSideEncryptionInfo.configuredMasterKeyId =
                        `${client.backend.arnPrefix}${configuredMasterKeyId}`;
                }

                return process.nextTick(() => cb(null, serverSideEncryptionInfo));
            }

            return this.createBucketKey(bucket, log, (err, data) => {
                if (err) {
                    return cb(err);
                }

                const { masterKeyId, masterKeyArn, isAccountEncryptionEnabled } = data;
                serverSideEncryptionInfo.masterKeyId = masterKeyArn || masterKeyId;

                if (isAccountEncryptionEnabled) {
                    serverSideEncryptionInfo.isAccountEncryptionEnabled = isAccountEncryptionEnabled;
                }

                return cb(null, serverSideEncryptionInfo);
            });
        }
       /*
        * no encryption
        */
        return cb(null, null);
    }
@param {BucketInfo} bucket - bucket info
@param {object} sseConfig - SSE configuration
@param {object} log - logger object
@param {function} cb - callback
@returns {undefined}
@callback called with (err, serverSideEncryptionInfo: object)