lib/ed25519_keccak/ed25519base.rb
def int_to_bytes( num , length )
      raise ArgumentError , "num :" + num.to_s if num < 0
      raise ArgumentError , "length :" + length.to_s if length < 0

      hex_str = num.to_s(16)
      hex_str = hex_str.rjust(length*2,"0")
      return hexstr_to_bytes(hex_str).reverse[0,length]
    end
def int_to_bytes( num , length )
      raise ArgumentError , "num :" + num.to_s if num < 0
      raise ArgumentError , "length :" + length.to_s if length < 0

      hex_str = num.to_s(16)
      hex_str = hex_str.rjust(length*2,"0")
      return hexstr_to_bytes(hex_str).reverse[0,length]
    end
convert int to byte-string (littleEndian)
 num    : unsigned number to convert to bytes
 length : byte length