Module: ThemisCommon
- Included in:
- Themis, Themis::SKeyPairGen, Themis::Scell, Themis::Scomparator, Themis::Smessage, Themis::Ssession
- Defined in:
- lib/rubythemis.rb
Class Method Summary collapse
Class Method Details
.string_to_pointer_size(string) ⇒ Object
20 21 22 23 24 |
# File 'lib/rubythemis.rb', line 20 def string_to_pointer_size(string) string_buf = FFI::MemoryPointer.new(:char, string.force_encoding("BINARY").size) string_buf.put_bytes(0, string.force_encoding("BINARY"), 0, string.force_encoding("BINARY").size) return string_buf, string.force_encoding("BINARY").size end |