Module: RubySMB::NTLM::Custom::StringEncoder::ClassMethods

Defined in:
lib/ruby_smb/ntlm/custom/string_encoder.rb

Instance Method Summary collapse

Instance Method Details

#encode_utf16le(str) ⇒ Object



13
14
15
# File 'lib/ruby_smb/ntlm/custom/string_encoder.rb', line 13

def encode_utf16le(str)
  str.dup.force_encoding('UTF-8').encode(Encoding::UTF_16LE, Encoding::UTF_8).force_encoding('ASCII-8BIT')
end