function parseObjectEncryptionHeaders(headers) {
    const sseAlgorithm = headers['x-amz-server-side-encryption'];
    const configuredMasterKeyId = headers['x-amz-server-side-encryption-aws-kms-key-id'] || null;

    if (sseAlgorithm && sseAlgorithm !== 'AES256' && sseAlgorithm !== 'aws:kms') {
        return {
            error: errorInstances.InvalidArgument
                .customizeDescription('The encryption method specified is not supported'),
        };
    }

    if (sseAlgorithm !== 'aws:kms' && configuredMasterKeyId) {
        return {
            error: errorInstances.InvalidArgument.customizeDescription(
                'a KMSMasterKeyID is not applicable if the default sse algorithm is not aws:kms'),
        };
    }
    return { objectSSE: hydrateEncryptionConfig(sseAlgorithm, configuredMasterKeyId) };
}
parseObjectEncryptionHeaders - retrieves bucket level sse configuration from request headers
@param {object} headers - Request headers
@returns {ServerSideEncryptionInfo} - SSE configuration