Class: Ccrypto::Ruby::NativeHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/ccrypto/ruby/utils/native_helper.rb

Class Method Summary collapse

Class Method Details

.is_byte_array?(dat) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
13
# File 'lib/ccrypto/ruby/utils/native_helper.rb', line 7

def self.is_byte_array?(dat)
  if not dat.nil?
    dat.is_a?(String) and (dat.count('01') == dat.size)
  else
    false
  end
end