base64BinaryEqual Function Description

Description

The base64BinaryEqual function compares two atomic values of type base64Binary and returns true if and only if the 2 arguments to the function are equal according to the equality rules defined by the base64Binary type.

base64BinaryEqual belongs to the ALFA function reference's equality predicates category. It maps to the XACML function identifier urn:oasis:names:tc:xacml:1.0:function:base64Binary-equal, takes 2 arguments and returns a value of type boolean.

Property Value
Category equality predicates
# Arguments 2
Arguments
  • 2 atomic values of type base64Binary
Return Value boolean
Expressed As in-fix
Representation a == b
Allowed In Target true
ALFA Shorthand ==
Commutative true

Example

/**
 * This rule will return Permit if either (a) there is at least one value in bag a
 * equal to bag b or (b) both bags contain one value exactly and the value in bag is
 * equal to the value in bag b.
 */
rule base64BinaryEqualExample{
    permit
    condition base64.a == base64.b || base64BinaryEqual(base64BinaryOneAndOnly(base64.a),base64BinaryOneAndOnly(base64.b))
}

This rule will return Permit if either (a) there is at least one value in bag a equal to bag b or (b) both bags contain one value exactly and the value in bag is equal to the value in bag b.