tt.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. console.log("hehe");
  2. var fs = require('fs');
  3. var path = require('path');
  4. var nb = require("../lib/buffa");
  5. /*
  6. /users/
  7. ...> 4096 * 1 000 000 000 =
  8. /keys/
  9. /chains/
  10. /functions/
  11. */
  12. var encrypted_128_32="187749072224295762487282918043534149672332073576421965240342031802796076852312979624462039930489469638032939592701476542616115194405919917816885550169746093998655163259338865191429411145240013448750356074919750181567300214345692210265751928296101064120937168774231852106267481208937252347283124988551418059454809672856083447046022344651974016900013818895117851874805199726514824244622008952896813863326946320945612189403046325541886117273885832350603933283875997272843548182406265786056456766070275758954247685425367007560037062219522220201834561243688272124574963233543177425502936846264857749139848800538369884576485531294930358428640880721058206395321457260483512027117476242450207688996353724075834484666578878943061022391272103649446366373852046756354585858851817906517337346734632871823296156130355511556317306203674864143053548383743459964982747828928091648542818060985487954169605103336900482351812784037195461047546547430461089525649350944335556405801516230204738273842824301868223137831537534582596187192545300745453530225117641760026575308563909626609971231034947876554241342888615944363256932391187341029800933432582468969833131634323884012412291638327950504603472053444014807076221414262820116300705320684061681306483837155402934992091026791662916302762242775179391979799097041544568732265351403304725931285119108590491529341933073731885838162614523084576618710612990893016835730740335573442848226017543318802701747018220373961779132354479139290622611945003596145005924608856077312068248211791238921546713583589297776685733642239"
  13. var bb= [];
  14. bb.push( "********************************************************************************************************************************" );
  15. bb.push( "*1 1 1 1*" );
  16. bb.push( "* 1 1 1 1 1 1 *" );
  17. bb.push( "* 1 1 1 1 1 1 *" );
  18. bb.push( "* 1 1 1 1 1 1 *" );
  19. bb.push( "* 1 1 1 1 1 1 *" );
  20. bb.push( "* 1 1 1 1 1 1 *" );
  21. bb.push( "* 1 1 1 1 1 1 *" );
  22. bb.push( "* 1 1 1 1 1 1 *" );
  23. bb.push( "* 1 1 1 1 1 1 *" );
  24. bb.push( "* 1 1 1 1 1 1 *" );
  25. bb.push( "* 1 1 1 1 1 1 *" );
  26. 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 *" );
  27. bb.push( "* 1 1 1 1 *" );
  28. bb.push( "* 1 1 1 1 *" );
  29. bb.push( "* 1 1 1 1 *" );
  30. bb.push( "* 1 1 1 1 *" );
  31. bb.push( "* 1 1 1 1 *" );
  32. bb.push( "* 1 1 1 1 *" );
  33. 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 *" );
  34. bb.push( "* 1 1 1 1 1 1 *" );
  35. bb.push( "* 1 1 1 1 1 1 *" );
  36. bb.push( "* 1 1 1 1 1 1 *" );
  37. bb.push( "* 1 1 1 1 1 1 *" );
  38. bb.push( "* 1 1 1 1 1 1 *" );
  39. bb.push( "* 1 1 1 1 1 1 *" );
  40. bb.push( "* 1 1 1 1 1 1 *" );
  41. bb.push( "* 1 1 1 1 1 1 *" );
  42. bb.push( "* 1 1 1 1 1 1 *" );
  43. bb.push( "* 1 1 1 1 1 1 *" );
  44. bb.push( "*1 1 1 1*" );
  45. bb.push( "********************************************************************************************************************************" );
  46. console.log(bb);
  47. var a = nb(bb.join("").replace(/ /g,0).replace(/[\*1]/g,1),2);
  48. function ara(str,ll){
  49. var ll = ll || 128;
  50. var b= [];
  51. while(str.length){
  52. b.push(str.substring(0,ll));
  53. str = str.substring(ll);
  54. }
  55. return b;
  56. }
  57. console.log(a.bitSize());
  58. console.log(a.toBase(10));
  59. console.log(a.toBase(16));
  60. console.log( ara(nb(a.toBase(16),16).toBase(2)).join("\n").replace(/1/g,"*").replace(/0/g," ") )
  61. console.log(a.toBase(123));
  62. //var f = a.nextPrime(a);
  63. //var fff = f.nextPrime(f.add(nb("1",10)));
  64. //console.log(ara(fff.toBase(2)));
  65. //console.log(ara(fff.toBase(64),200));
  66. //var ffff = fff.nextPrime(fff.add(nb("1",10)));
  67. //console.log(ara(ffff.toBase(2)));
  68. //console.log(ara(ffff.toBase(64),200));