lib/utils/xml-utils.js
function setProtectedBinary(node, binary) {
    if (binary instanceof ProtectedValue) {
        node.protectedValue = binary;
        node.setAttribute(XmlNames.Attr.Protected, 'True');
    } else if (binary && binary.ref) {
        node.setAttribute(XmlNames.Attr.Ref, binary.ref);
    } else {
        setBytes(node, binary);
    }
}
function setProtectedBinary(node, binary) {
    if (binary instanceof ProtectedValue) {
        node.protectedValue = binary;
        node.setAttribute(XmlNames.Attr.Protected, 'True');
    } else if (binary && binary.ref) {
        node.setAttribute(XmlNames.Attr.Ref, binary.ref);
    } else {
        setBytes(node, binary);
    }
}
function setProtectedBinary ( node , binary ) { if ( binary instanceof ProtectedValue ) { node . protectedValue = binary ; node . setAttribute ( XmlNames . Attr . Protected , 'True' ) ; } else if ( binary && binary . ref ) { node . setAttribute ( XmlNames . Attr . Ref , binary . ref ) ; } else { setBytes ( node , binary ) ; } }
Sets node protected binary
@param {Node} node
@param {ProtectedValue|ArrayBuffer|{ref: string}|string} binary
Sets node protected binary