console.log("hehe"); var fs = require('fs'); var path = require('path'); var nb = require("../lib/buffa"); /* /users/ ...> 4096 * 1 000 000 000 = /keys/ /chains/ /functions/ */ var encrypted_128_32="187749072224295762487282918043534149672332073576421965240342031802796076852312979624462039930489469638032939592701476542616115194405919917816885550169746093998655163259338865191429411145240013448750356074919750181567300214345692210265751928296101064120937168774231852106267481208937252347283124988551418059454809672856083447046022344651974016900013818895117851874805199726514824244622008952896813863326946320945612189403046325541886117273885832350603933283875997272843548182406265786056456766070275758954247685425367007560037062219522220201834561243688272124574963233543177425502936846264857749139848800538369884576485531294930358428640880721058206395321457260483512027117476242450207688996353724075834484666578878943061022391272103649446366373852046756354585858851817906517337346734632871823296156130355511556317306203674864143053548383743459964982747828928091648542818060985487954169605103336900482351812784037195461047546547430461089525649350944335556405801516230204738273842824301868223137831537534582596187192545300745453530225117641760026575308563909626609971231034947876554241342888615944363256932391187341029800933432582468969833131634323884012412291638327950504603472053444014807076221414262820116300705320684061681306483837155402934992091026791662916302762242775179391979799097041544568732265351403304725931285119108590491529341933073731885838162614523084576618710612990893016835730740335573442848226017543318802701747018220373961779132354479139290622611945003596145005924608856077312068248211791238921546713583589297776685733642239" var bb= []; bb.push( "********************************************************************************************************************************" ); bb.push( "*1 1 1 1*" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 *" ); bb.push( "* 1 1 1 1 *" ); bb.push( "* 1 1 1 1 *" ); bb.push( "* 1 1 1 1 *" ); bb.push( "* 1 1 1 1 *" ); bb.push( "* 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "* 1 1 1 1 1 1 *" ); bb.push( "*1 1 1 1*" ); bb.push( "********************************************************************************************************************************" ); console.log(bb); var a = nb(bb.join("").replace(/ /g,0).replace(/[\*1]/g,1),2); function ara(str,ll){ var ll = ll || 128; var b= []; while(str.length){ b.push(str.substring(0,ll)); str = str.substring(ll); } return b; } console.log(a.bitSize()); console.log(a.toBase(10)); console.log(a.toBase(16)); console.log( ara(nb(a.toBase(16),16).toBase(2)).join("\n").replace(/1/g,"*").replace(/0/g," ") ) console.log(a.toBase(123)); //var f = a.nextPrime(a); //var fff = f.nextPrime(f.add(nb("1",10))); //console.log(ara(fff.toBase(2))); //console.log(ara(fff.toBase(64),200)); //var ffff = fff.nextPrime(fff.add(nb("1",10))); //console.log(ara(ffff.toBase(2))); //console.log(ara(ffff.toBase(64),200));