lib/sepa/utilities.rb
# Calculates a SHA1 digest for a given node. Before the calculation, the node is canonicalized
# exclusively.
#
# @param node [Nokogiri::Node] the node which the digest is calculated from
# @return [String] the calculated digest
Calculates a SHA1 digest for a given node. Before the calculation, the node is canonicalized
exclusively.
Calculates a SHA1 digest for a given node . Before the calculation the node is canonicalized exclusively .
def calculate_digest(node)
      sha1 = OpenSSL::Digest::SHA1.new
      canon_node = canonicalize_exclusively(node)
      encode(sha1.digest(canon_node)).gsub(/\s+/, "")
    end
def calculate_digest ( node ) sha1 = OpenSSL :: Digest :: SHA1 . new canon_node = canonicalize_exclusively ( node ) encode ( sha1 . digest ( canon_node ) ) . gsub ( / \s + / , "" ) end
Calculates a SHA1 digest for a given node.
Calculates a SHA1 digest for a given node .
the calculated digest
the calculated digest
String
node
the node which the digest is calculated from
the node which the digest is calculated from