pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
digest.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
Include dependency graph for digest.c:

Go to the source code of this file.

Macros

#define BEST_EFFORT_STATUS   0
 

Functions

char * calculate_on_disk_digest (xmlNode *input)
 Calculate and return digest of XML tree, suitable for storing on disk. More...
 
char * calculate_operation_digest (xmlNode *input, const char *version)
 Calculate and return digest of XML operation. More...
 
char * calculate_xml_versioned_digest (xmlNode *input, gboolean sort, gboolean do_filter, const char *version)
 Calculate and return digest of XML tree. More...
 
gboolean crm_digest_verify (xmlNode *input, const char *expected)
 

Macro Definition Documentation

#define BEST_EFFORT_STATUS   0

Definition at line 30 of file digest.c.

Function Documentation

char* calculate_on_disk_digest ( xmlNode *  input)

Calculate and return digest of XML tree, suitable for storing on disk.

Parameters
[in]inputRoot of XML to digest
Returns
Newly allocated string containing digest

Definition at line 156 of file digest.c.

char* calculate_operation_digest ( xmlNode *  input,
const char *  version 
)

Calculate and return digest of XML operation.

Parameters
[in]inputRoot of XML to digest
[in]versionNot used
Returns
Newly allocated string containing digest

Definition at line 175 of file digest.c.

char* calculate_xml_versioned_digest ( xmlNode *  input,
gboolean  sort,
gboolean  do_filter,
const char *  version 
)

Calculate and return digest of XML tree.

Parameters
[in]inputRoot of XML to digest
[in]sortWhether to sort XML before calculating digest
[in]do_filterWhether to filter certain XML attributes
[in]versionCRM feature set version (used to select v1/v2 digest)
Returns
Newly allocated string containing digest

Definition at line 192 of file digest.c.

gboolean crm_digest_verify ( xmlNode *  input,
const char *  expected 
)

Definition at line 222 of file digest.c.