#include #include #include #include #include #include #include "eyetil.h" binary_t& binary_t::from_hex(const std::string& h) { /* TODO: algorithmize */ std::string::size_type hs = h.length(); if(hs&1) throw std::runtime_error("odd number of characters in hexadecimal number"); int rvs = hs>>1; resize(rvs); const unsigned char *hp = (const unsigned char*)h.data(); iterator oi=begin(); char t[3] = { 0,0,0 }; for(int i=0;i