Class: XmlSig::XMLC14NBase

Inherits:
Object
  • Object
show all
Defined in:
lib/xml_sig/canonicalization_method.rb

Direct Known Subclasses

XMLC14NWithComments, XMLC14NWithoutComments

Instance Method Summary collapse

Instance Method Details

#convert_linebreaks(content) ⇒ Object



22
23
24
# File 'lib/xml_sig/canonicalization_method.rb', line 22

def convert_linebreaks(content)
  content.gsub(/\r\n/, "\n").gsub(/\r/, "\n")
end

#convert_to_utf8(content, from) ⇒ Object

Convert the content from the given charset to UTF-8.



19
20
21
# File 'lib/xml_sig/canonicalization_method.rb', line 19

def convert_to_utf8(content, from)
  Iconv.iconv('UTF-8', from, content).join
end

#normalize_attribute_values(content) ⇒ Object



25
26
27
# File 'lib/xml_sig/canonicalization_method.rb', line 25

def normalize_attribute_values(content)
  
end