ctf-party 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +29 -0
  3. data/.yardopts +4 -0
  4. data/.yardopts-dev +6 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +52 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +57 -0
  9. data/Rakefile +11 -0
  10. data/bin/ctf_party_console +7 -0
  11. data/bin/ctf_party_setup +6 -0
  12. data/docs/.nojekyll +0 -0
  13. data/docs/About.md +5 -0
  14. data/docs/CHANGELOG.md +5 -0
  15. data/docs/README.md +52 -0
  16. data/docs/_coverpage.md +10 -0
  17. data/docs/_media/logo.png +0 -0
  18. data/docs/_navbar.md +3 -0
  19. data/docs/_sidebar.md +13 -0
  20. data/docs/index.html +31 -0
  21. data/docs/pages/documentation.md +30 -0
  22. data/docs/pages/install.md +84 -0
  23. data/docs/pages/publishing.md +39 -0
  24. data/docs/pages/quick-start.md +23 -0
  25. data/docs/pages/usage.md +61 -0
  26. data/docs/vendor/docsify.js +1 -0
  27. data/docs/vendor/plugins/emoji.min.js +1 -0
  28. data/docs/vendor/plugins/search.min.js +1 -0
  29. data/docs/vendor/prismjs/components/prism-ruby.min.js +1 -0
  30. data/docs/vendor/themes/vue.css +1 -0
  31. data/docs/yard/String.html +2909 -0
  32. data/docs/yard/Version.html +121 -0
  33. data/docs/yard/_index.html +123 -0
  34. data/docs/yard/class_list.html +51 -0
  35. data/docs/yard/css/common.css +1 -0
  36. data/docs/yard/css/full_list.css +58 -0
  37. data/docs/yard/css/style.css +496 -0
  38. data/docs/yard/file.LICENSE.html +70 -0
  39. data/docs/yard/file.README.html +124 -0
  40. data/docs/yard/file_list.html +61 -0
  41. data/docs/yard/frames.html +17 -0
  42. data/docs/yard/index.html +124 -0
  43. data/docs/yard/js/app.js +303 -0
  44. data/docs/yard/js/full_list.js +216 -0
  45. data/docs/yard/js/jquery.js +4 -0
  46. data/docs/yard/method_list.html +275 -0
  47. data/docs/yard/top-level-namespace.html +112 -0
  48. data/lib/ctf_party.rb +7 -0
  49. data/lib/ctf_party/base64.rb +99 -0
  50. data/lib/ctf_party/digest.rb +115 -0
  51. data/lib/ctf_party/flag.rb +94 -0
  52. data/lib/ctf_party/rot.rb +47 -0
  53. data/lib/ctf_party/version.rb +5 -0
  54. data/test/test_string.rb +134 -0
  55. metadata +218 -0
@@ -0,0 +1,39 @@
1
+ # Publishing
2
+
3
+ ## On Rubygems.org
4
+
5
+ ```
6
+ $ git tag -a vx.x.x
7
+ $ git push --follow-tags
8
+ $ gem push ctf-party-x.x.x.gem
9
+ ```
10
+
11
+ See https://guides.rubygems.org/publishing/.
12
+
13
+ On new release don't forget to rebuild the library documentation:
14
+
15
+ ```
16
+ $ bundle exec yard doc
17
+ ```
18
+
19
+ An to be sure all tests pass!
20
+
21
+ ```
22
+ $ rake test
23
+ ```
24
+
25
+ ## On BlackArch
26
+
27
+ BA process
28
+
29
+ On new release don't forget to rebuild the library documentation:
30
+
31
+ ```
32
+ $ bundle exec yard doc
33
+ ```
34
+
35
+ An to be sure all tests pass!
36
+
37
+ ```
38
+ $ rake test
39
+ ```
@@ -0,0 +1,23 @@
1
+
2
+ ## Quick install
3
+
4
+ ```
5
+ $ gem install ctf-party
6
+ ```
7
+
8
+ ## Library
9
+
10
+ ```ruby
11
+ require 'ctf_party'
12
+
13
+ 'string'.to_b64
14
+ ```
15
+
16
+ ## Console
17
+
18
+ Launch `irb` with the library loaded.
19
+
20
+ ```
21
+ $ ctf_party_console
22
+ irb(main):001:0>
23
+ ```
@@ -0,0 +1,61 @@
1
+ # Usage
2
+
3
+ ## Examples of usage
4
+
5
+ For base64 encoding instead of writting:
6
+
7
+ ```ruby
8
+ require 'base64'
9
+
10
+ myvar = 'string'
11
+ myvar = Base64.strict_encode64(myvar)
12
+ ```
13
+
14
+ Just write (shorter and easier to remember):
15
+
16
+ ```ruby
17
+ require 'ctf_party'
18
+
19
+ myvar = 'string'
20
+ myvar.to_b64!
21
+ ```
22
+
23
+ For base64 verification instead of writting:
24
+
25
+ ```ruby
26
+ reg = %r{\A(?:[a-zA-Z0-9+/]{4})*(?:|(?:[a-zA-Z0-9+/]{3}=)|
27
+ (?:[a-zA-Z0-9+/]{2}==)|(?:[a-zA-Z0-9+/]{1}===))\Z}xn
28
+ reg.match?('SGVsbG8gd29ybGQh')
29
+ ```
30
+
31
+ Just write:
32
+
33
+ ```ruby
34
+ 'SGVsbG8gd29ybGQh'.b64?
35
+ ```
36
+
37
+ For hash/digest instead of writting:
38
+
39
+ ```ruby
40
+ Digest::SHA2.new(512).hexdigest('mystr')
41
+ ```
42
+
43
+ Just write:
44
+
45
+ ```ruby
46
+ 'mystr'.sha2_512
47
+ ```
48
+
49
+ For rot/rot13/ceasar cipher simply use:
50
+
51
+ ```ruby
52
+ 'mystr'.rot13
53
+ 'mystr'.rot(shift: 11)
54
+ ```
55
+
56
+ For generating a flag respecting a flag format:
57
+
58
+ ```ruby
59
+ String.flag = {prefix: 'sigsegv', digest: 'md5'}
60
+ 'this_1s_a_fl4g'.flag # => "sigsegv{a5bec9e2a86b6b70d288451eb38dfec8}"
61
+ ```
@@ -0,0 +1 @@
1
+ !function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]=n(e))}}var o=s(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),l=Object.prototype.hasOwnProperty,d=Object.assign||function(e){for(var t=arguments,n=1;n<arguments.length;n++){var r=Object(t[n]);for(var i in r)l.call(r,i)&&(e[i]=r[i])}return e};function c(e){return"string"==typeof e||"number"==typeof e}function p(){}function u(e){return"function"==typeof e}function h(e,t,r,i){void 0===i&&(i=p);var a=e._hooks[t],o=function(t){var e=a[t];if(t>=a.length)i(r);else if("function"==typeof e)if(2===e.length)e(r,function(e){r=e,o(t+1)});else{var n=e(r);r=void 0===n?r:n,o(t+1)}else o(t+1)};o(0)}var f=!0,m=f&&document.body.clientWidth<=600,g=f&&window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),n={};function v(e,t){if(void 0===t&&(t=!1),"string"==typeof e){if(void 0!==window.Vue)return x(e);e=t?x(e):n[e]||(n[e]=x(e))}return e}var b=f&&document,y=f&&b.body,k=f&&b.head;function x(e,t){return t?e.querySelector(t):b.querySelector(e)}function w(e,t){return[].slice.call(t?e.querySelectorAll(t):b.querySelectorAll(e))}function _(e,t){return e=b.createElement(e),t&&(e.innerHTML=t),e}function S(e,t){return e.appendChild(t)}function A(e,t){return e.insertBefore(t,e.children[0])}function C(e,t,n){u(t)?window.addEventListener(e,t):e.addEventListener(t,n)}function E(e,t,n){u(t)?window.removeEventListener(e,t):e.removeEventListener(t,n)}function $(e,t,n){e&&e.classList[n?t:"toggle"](n||t)}var L,T,e=Object.freeze({getNode:v,$:b,body:y,head:k,find:x,findAll:w,create:_,appendTo:S,before:A,on:C,off:E,toggleClass:$,style:function(e){S(k,_("style",e))}});function R(e,t){if(void 0===t&&(t='<ul class="app-sub-sidebar">{inner}</ul>'),!e||!e.length)return"";var n="";return e.forEach(function(e){n+='<li><a class="section-link" href="'+e.slug+'">'+e.title+"</a></li>",e.children&&(n+=R(e.children,t))}),t.replace("{inner}",n)}function r(e,t){return'<p class="'+e+'">'+t.slice(5).trim()+"</p>"}function P(e){var t,n,r=e.loaded,i=e.total,a=e.step;!L&&((n=_("div")).classList.add("progress"),S(y,n),L=n),t=a?80<(t=parseInt(L.style.width||0,10)+a)?80:t:Math.floor(r/i*100),L.style.opacity=1,L.style.width=95<=t?"100%":t+"%",95<=t&&(clearTimeout(T),T=setTimeout(function(e){L.style.opacity=0,L.style.width="0%"},200))}var O={};function F(a,e,t){void 0===e&&(e=!1),void 0===t&&(t={});var o=new XMLHttpRequest,n=function(){o.addEventListener.apply(o,arguments)},r=O[a];if(r)return{then:function(e){return e(r.content,r.opt)},abort:p};for(var i in o.open("GET",a),t)l.call(t,i)&&o.setRequestHeader(i,t[i]);return o.send(),{then:function(r,i){if(void 0===i&&(i=p),e){var t=setInterval(function(e){return P({step:Math.floor(5*Math.random()+1)})},500);n("progress",P),n("loadend",function(e){P(e),clearInterval(t)})}n("error",i),n("load",function(e){var t=e.target;if(400<=t.status)i(t);else{var n=O[a]={content:t.response,opt:{updatedAt:o.getResponseHeader("last-modified")}};r(n.content,n.opt)}})},abort:function(e){return 4!==o.readyState&&o.abort()}}}function j(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}var N=/([^{]*?)\w(?=\})/g,z={YYYY:"getFullYear",YY:"getYear",MM:function(e){return e.getMonth()+1},DD:"getDate",HH:"getHours",mm:"getMinutes",ss:"getSeconds"};var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t){return e(t={exports:{}},t.exports),t.exports}var M=i(function(m,e){!function(e){var y={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function l(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||f.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.options.tables?this.rules=y.tables:this.rules=y.gfm)}y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=t(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d+\.)/,y.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,y.item=t(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=t(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y._comment=/<!--(?!-?>)[\s\S]*?-->/,y.html=t(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=t(y.paragraph).replace("hr",y.hr).replace("heading",y.heading).replace("lheading",y.lheading).replace("tag",y._tag).getRegex(),y.blockquote=t(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=g({},y),y.gfm=g({},y.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),y.gfm.paragraph=t(y.paragraph).replace("(?!","(?!"+y.gfm.fences.source.replace("\\1","\\2")+"|"+y.list.source.replace("\\1","\\3")+"|").getRegex(),y.tables=g({},y.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=g({},y.normal,{html:t("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),l.rules=y,l.lex=function(e,t){return new l(t).lex(e)},l.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},l.prototype.token=function(e,t){var n,r,i,a,o,s,l,c,u,p,h,d,g,f,m,v,b=this;for(e=e.replace(/^ +$/gm,"");e;)if((i=b.rules.newline.exec(e))&&(e=e.substring(i[0].length),1<i[0].length&&b.tokens.push({type:"space"})),i=b.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),b.tokens.push({type:"code",text:b.options.pedantic?i:x(i,"\n")});else if(i=b.rules.fences.exec(e))e=e.substring(i[0].length),b.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=b.rules.heading.exec(e))e=e.substring(i[0].length),b.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=b.rules.nptable.exec(e))&&(s={type:"table",header:k(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===s.align.length){for(e=e.substring(i[0].length),h=0;h<s.align.length;h++)/^ *-+: *$/.test(s.align[h])?s.align[h]="right":/^ *:-+: *$/.test(s.align[h])?s.align[h]="center":/^ *:-+ *$/.test(s.align[h])?s.align[h]="left":s.align[h]=null;for(h=0;h<s.cells.length;h++)s.cells[h]=k(s.cells[h],s.header.length);b.tokens.push(s)}else if(i=b.rules.hr.exec(e))e=e.substring(i[0].length),b.tokens.push({type:"hr"});else if(i=b.rules.blockquote.exec(e))e=e.substring(i[0].length),b.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),b.token(i,t),b.tokens.push({type:"blockquote_end"});else if(i=b.rules.list.exec(e)){for(e=e.substring(i[0].length),l={type:"list_start",ordered:f=1<(a=i[2]).length,start:f?+a:"",loose:!1},b.tokens.push(l),n=!(c=[]),g=(i=i[0].match(b.rules.item)).length,h=0;h<g;h++)p=(s=i[h]).length,~(s=s.replace(/^ *([*+-]|\d+\.) +/,"")).indexOf("\n ")&&(p-=s.length,s=b.options.pedantic?s.replace(/^ {1,4}/gm,""):s.replace(new RegExp("^ {1,"+p+"}","gm"),"")),b.options.smartLists&&h!==g-1&&(a===(o=y.bullet.exec(i[h+1])[0])||1<a.length&&1<o.length||(e=i.slice(h+1).join("\n")+e,h=g-1)),r=n||/\n\n(?!\s*$)/.test(s),h!==g-1&&(n="\n"===s.charAt(s.length-1),r||(r=n)),r&&(l.loose=!0),v=void 0,(m=/^\[[ xX]\] /.test(s))&&(v=" "!==s[1],s=s.replace(/^\[[ xX]\] +/,"")),u={type:"list_item_start",task:m,checked:v,loose:r},c.push(u),b.tokens.push(u),b.token(s,!1),b.tokens.push({type:"list_item_end"});if(l.loose)for(g=c.length,h=0;h<g;h++)c[h].loose=!0;b.tokens.push({type:"list_end"})}else if(i=b.rules.html.exec(e))e=e.substring(i[0].length),b.tokens.push({type:b.options.sanitize?"paragraph":"html",pre:!b.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(t&&(i=b.rules.def.exec(e)))e=e.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),d=i[1].toLowerCase().replace(/\s+/g," "),b.tokens.links[d]||(b.tokens.links[d]={href:i[2],title:i[3]});else if(t&&(i=b.rules.table.exec(e))&&(s={type:"table",header:k(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===s.align.length){for(e=e.substring(i[0].length),h=0;h<s.align.length;h++)/^ *-+: *$/.test(s.align[h])?s.align[h]="right":/^ *:-+: *$/.test(s.align[h])?s.align[h]="center":/^ *:-+ *$/.test(s.align[h])?s.align[h]="left":s.align[h]=null;for(h=0;h<s.cells.length;h++)s.cells[h]=k(s.cells[h].replace(/^ *\| *| *\| *$/g,""),s.header.length);b.tokens.push(s)}else if(i=b.rules.lheading.exec(e))e=e.substring(i[0].length),b.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(t&&(i=b.rules.paragraph.exec(e)))e=e.substring(i[0].length),b.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=b.rules.text.exec(e))e=e.substring(i[0].length),b.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var n={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:d,text:/^(`+|[^`])[\s\S]*?(?=[\\<!\[`*]|\b_| {2,}\n|$)/};function c(e,t){if(this.options=t||f.defaults,this.links=e,this.rules=n.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=n.pedantic:this.options.gfm&&(this.options.breaks?this.rules=n.breaks:this.rules=n.gfm)}function r(e){this.options=e||f.defaults}function i(){}function u(e){this.tokens=[],this.token=null,this.options=e||f.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function p(e,t){if(t){if(p.escapeTest.test(e))return e.replace(p.escapeReplace,function(e){return p.replacements[e]})}else if(p.escapeTestNoEncode.test(e))return e.replace(p.escapeReplaceNoEncode,function(e){return p.replacements[e]});return e}function h(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function t(n,e){return n=n.source||n,e=e||"",{replace:function(e,t){return t=(t=t.source||t).replace(/(^|[^\[])\^/g,"$1"),n=n.replace(e,t),this},getRegex:function(){return new RegExp(n,e)}}}function a(e,t){return o[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?o[" "+e]=e+"/":o[" "+e]=x(e,"/",!0)),e=o[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,n.autolink=t(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=t(n.tag).replace("comment",y._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,n._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f\\]*\)|[^\s\x00-\x1f()\\])*?)/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=t(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=t(n.reflink).replace("label",n._label).getRegex(),n.normal=g({},n),n.pedantic=g({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:t(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=g({},n.normal,{escape:t(n.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:t(n.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),n.gfm.url=t(n.gfm.url).replace("email",n.gfm._extended_email).getRegex(),n.breaks=g({},n.gfm,{br:t(n.br).replace("{2,}","*").getRegex(),text:t(n.gfm.text).replace("{2,}","*").getRegex()}),c.rules=n,c.output=function(e,t,n){return new c(t,n).output(e)},c.prototype.output=function(e){for(var t,n,r,i,a,o,s=this,l="";e;)if(a=s.rules.escape.exec(e))e=e.substring(a[0].length),l+=a[1];else if(a=s.rules.autolink.exec(e))e=e.substring(a[0].length),r="@"===a[2]?"mailto:"+(n=p(s.mangle(a[1]))):n=p(a[1]),l+=s.renderer.link(r,null,n);else if(s.inLink||!(a=s.rules.url.exec(e))){if(a=s.rules.tag.exec(e))!s.inLink&&/^<a /i.test(a[0])?s.inLink=!0:s.inLink&&/^<\/a>/i.test(a[0])&&(s.inLink=!1),!s.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?s.inRawBlock=!0:s.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(s.inRawBlock=!1),e=e.substring(a[0].length),l+=s.options.sanitize?s.options.sanitizer?s.options.sanitizer(a[0]):p(a[0]):a[0];else if(a=s.rules.link.exec(e))e=e.substring(a[0].length),s.inLink=!0,r=a[2],i=s.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],t[3]):"":a[3]?a[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=s.outputLink(a,{href:c.escapes(r),title:c.escapes(i)}),s.inLink=!1;else if((a=s.rules.reflink.exec(e))||(a=s.rules.nolink.exec(e))){if(e=e.substring(a[0].length),t=(a[2]||a[1]).replace(/\s+/g," "),!(t=s.links[t.toLowerCase()])||!t.href){l+=a[0].charAt(0),e=a[0].substring(1)+e;continue}s.inLink=!0,l+=s.outputLink(a,t),s.inLink=!1}else if(a=s.rules.strong.exec(e))e=e.substring(a[0].length),l+=s.renderer.strong(s.output(a[4]||a[3]||a[2]||a[1]));else if(a=s.rules.em.exec(e))e=e.substring(a[0].length),l+=s.renderer.em(s.output(a[6]||a[5]||a[4]||a[3]||a[2]||a[1]));else if(a=s.rules.code.exec(e))e=e.substring(a[0].length),l+=s.renderer.codespan(p(a[2].trim(),!0));else if(a=s.rules.br.exec(e))e=e.substring(a[0].length),l+=s.renderer.br();else if(a=s.rules.del.exec(e))e=e.substring(a[0].length),l+=s.renderer.del(s.output(a[1]));else if(a=s.rules.text.exec(e))e=e.substring(a[0].length),s.inRawBlock?l+=s.renderer.text(a[0]):l+=s.renderer.text(p(s.smartypants(a[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===a[2])r="mailto:"+(n=p(a[0]));else{for(;o=a[0],a[0]=s.rules._backpedal.exec(a[0])[0],o!==a[0];);n=p(a[0]),r="www."===a[1]?"http://"+n:n}e=e.substring(a[0].length),l+=s.renderer.link(r,null,n)}return l},c.escapes=function(e){return e?e.replace(c.rules._escapes,"$1"):e},c.prototype.outputLink=function(e,t){var n=t.href,r=t.title?p(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,p(e[1]))},c.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},c.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),.5<Math.random()&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+p(t,!0)+'">'+(n?e:p(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:p(e,!0))+"</code></pre>"},r.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},r.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},r.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},r.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},r.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},r.prototype.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},r.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},r.prototype.strong=function(e){return"<strong>"+e+"</strong>"},r.prototype.em=function(e){return"<em>"+e+"</em>"},r.prototype.codespan=function(e){return"<code>"+e+"</code>"},r.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.prototype.del=function(e){return"<del>"+e+"</del>"},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(h(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!s.test(e)&&(e=a(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var i='<a href="'+p(e)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},r.prototype.image=function(e,t,n){this.options.baseUrl&&!s.test(e)&&(e=a(this.options.baseUrl,e));var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},r.prototype.text=function(e){return e},i.prototype.strong=i.prototype.em=i.prototype.codespan=i.prototype.del=i.prototype.text=function(e){return e},i.prototype.link=i.prototype.image=function(e,t,n){return""+n},i.prototype.br=function(){return""},u.parse=function(e,t){return new u(t).parse(e)},u.prototype.parse=function(e){this.inline=new c(e.links,this.options),this.inlineText=new c(e.links,g({},this.options,{renderer:new i})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},u.prototype.next=function(){return this.token=this.tokens.pop()},u.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},u.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},u.prototype.tok=function(){var e=this;switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,h(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,n,r,i,a="",o="";for(r="",t=0;t<this.token.header.length;t++)r+=e.renderer.tablecell(e.inline.output(e.token.header[t]),{header:!0,align:e.token.align[t]});for(a+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=e.token.cells[t],r="",i=0;i<n.length;i++)r+=e.renderer.tablecell(e.inline.output(n[i]),{header:!1,align:e.token.align[i]});o+=e.renderer.tablerow(r)}return this.renderer.table(a,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=e.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var s=this.token.ordered,l=this.token.start;"list_end"!==this.next().type;)o+=e.tok();return this.renderer.list(o,s,l);case"list_item_start":o="";var c=this.token.loose;for(this.token.task&&(o+=this.renderer.checkbox(this.token.checked));"list_item_end"!==this.next().type;)o+=c||"text"!==e.token.type?e.tok():e.parseText();return this.renderer.listitem(o);case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},p.escapeTest=/[&<>"']/,p.escapeReplace=/[&<>"']/g,p.replacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,p.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var o={},s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(){}function g(e){for(var t,n,r=arguments,i=1;i<arguments.length;i++)for(n in t=r[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function k(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;0<=--i&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function x(e,t,n){if(0===e.length)return"";for(var r=0;r<e.length;){var i=e.charAt(e.length-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.substr(0,e.length-r)}function f(e,n,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(r||"function"==typeof n){r||(r=n,n=null);var i,a,o=(n=g({},f.defaults,n||{})).highlight,t=0;try{i=l.lex(e,n)}catch(e){return r(e)}a=i.length;var s=function(t){if(t)return n.highlight=o,r(t);var e;try{e=u.parse(i,n)}catch(e){t=e}return n.highlight=o,t?r(t):r(null,e)};if(!o||o.length<3)return s();if(delete n.highlight,!a)return s();for(;t<i.length;t++)!function(n){"code"!==n.type?--a||s():o(n.text,n.lang,function(e,t){return e?s(e):null==t||t===n.text?--a||s():(n.text=t,n.escaped=!0,void(--a||s()))})}(i[t])}else try{return n&&(n=g({},f.defaults,n)),u.parse(l.lex(e,n),n)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(n||f.defaults).silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}d.exec=d,f.options=f.setOptions=function(e){return g(f.defaults,e),f},f.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},f.defaults=f.getDefaults(),f.Parser=u,f.parser=u.parse,f.Renderer=r,f.TextRenderer=i,f.Lexer=l,f.lexer=l.lex,f.InlineLexer=c,f.inlineLexer=c.output,f.parse=f,m.exports=f}(t||"undefined"!=typeof window&&window)}),a=i(function(e){var c="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},u=function(){var l=/\blang(?:uage)?-([\w-]+)\b/i,t=0,P=c.Prism={manual:c.Prism&&c.Prism.manual,disableWorkerMessageHandler:c.Prism&&c.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof o?new o(e.type,P.util.encode(e.content),e.alias):"Array"===P.util.type(e)?e.map(P.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e,n){var t=P.util.type(e);switch(n=n||{},t){case"Object":if(n[P.util.objId(e)])return n[P.util.objId(e)];var r={};for(var i in n[P.util.objId(e)]=r,e)e.hasOwnProperty(i)&&(r[i]=P.util.clone(e[i],n));return r;case"Array":if(n[P.util.objId(e)])return n[P.util.objId(e)];r=[];return n[P.util.objId(e)]=r,e.forEach(function(e,t){r[t]=P.util.clone(e,n)}),r}return e}},languages:{extend:function(e,t){var n=P.util.clone(P.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(n,e,t,r){var i=(r=r||P.languages)[n];if(2==arguments.length){for(var a in t=e)t.hasOwnProperty(a)&&(i[a]=t[a]);return i}var o={};for(var s in i)if(i.hasOwnProperty(s)){if(s==e)for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);o[s]=i[s]}return P.languages.DFS(P.languages,function(e,t){t===r[n]&&e!=n&&(this[e]=o)}),r[n]=o},DFS:function(e,t,n,r){for(var i in r=r||{},e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],n||i),"Object"!==P.util.type(e[i])||r[P.util.objId(e[i])]?"Array"!==P.util.type(e[i])||r[P.util.objId(e[i])]||(r[P.util.objId(e[i])]=!0,P.languages.DFS(e[i],t,i,r)):(r[P.util.objId(e[i])]=!0,P.languages.DFS(e[i],t,null,r)))}},plugins:{},highlightAll:function(e,t){P.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};P.hooks.run("before-highlightall",r);for(var i,a=r.elements||e.querySelectorAll(r.selector),o=0;i=a[o++];)P.highlightElement(i,!0===t,r.callback)},highlightElement:function(e,t,n){for(var r,i,a=e;a&&!l.test(a.className);)a=a.parentNode;a&&(r=(a.className.match(l)||[,""])[1].toLowerCase(),i=P.languages[r]),e.className=e.className.replace(l,"").replace(/\s+/g," ")+" language-"+r,e.parentNode&&(a=e.parentNode,/pre/i.test(a.nodeName)&&(a.className=a.className.replace(l,"").replace(/\s+/g," ")+" language-"+r));var o={element:e,language:r,grammar:i,code:e.textContent};if(P.hooks.run("before-sanity-check",o),!o.code||!o.grammar)return o.code&&(P.hooks.run("before-highlight",o),o.element.textContent=o.code,P.hooks.run("after-highlight",o)),void P.hooks.run("complete",o);if(P.hooks.run("before-highlight",o),t&&c.Worker){var s=new Worker(P.filename);s.onmessage=function(e){o.highlightedCode=e.data,P.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,n&&n.call(o.element),P.hooks.run("after-highlight",o),P.hooks.run("complete",o)},s.postMessage(JSON.stringify({language:o.language,code:o.code,immediateClose:!0}))}else o.highlightedCode=P.highlight(o.code,o.grammar,o.language),P.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,n&&n.call(e),P.hooks.run("after-highlight",o),P.hooks.run("complete",o)},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};return P.hooks.run("before-tokenize",r),r.tokens=P.tokenize(r.code,r.grammar),P.hooks.run("after-tokenize",r),o.stringify(P.util.encode(r.tokens),r.language)},matchGrammar:function(e,t,n,r,i,a,o){var s=P.Token;for(var l in n)if(n.hasOwnProperty(l)&&n[l]){if(l==o)return;var c=n[l];c="Array"===P.util.type(c)?c:[c];for(var u=0;u<c.length;++u){var p=c[u],h=p.inside,d=!!p.lookbehind,g=!!p.greedy,f=0,m=p.alias;if(g&&!p.pattern.global){var v=p.pattern.toString().match(/[imuy]*$/)[0];p.pattern=RegExp(p.pattern.source,v+"g")}p=p.pattern||p;for(var b=r,y=i;b<t.length;y+=t[b].length,++b){var k=t[b];if(t.length>e.length)return;if(!(k instanceof s)){if(g&&b!=t.length-1){if(p.lastIndex=y,!(C=p.exec(e)))break;for(var x=C.index+(d?C[1].length:0),w=C.index+C[0].length,_=b,S=y,A=t.length;_<A&&(S<w||!t[_].type&&!t[_-1].greedy);++_)(S+=t[_].length)<=x&&(++b,y=S);if(t[b]instanceof s)continue;E=_-b,k=e.slice(y,S),C.index-=y}else{p.lastIndex=0;var C=p.exec(k),E=1}if(C){d&&(f=C[1]?C[1].length:0);w=(x=C.index+f)+(C=C[0].slice(f)).length;var $=k.slice(0,x),L=k.slice(w),T=[b,E];$&&(++b,y+=$.length,T.push($));var R=new s(l,h?P.tokenize(C,h):C,m,C,g);if(T.push(R),L&&T.push(L),Array.prototype.splice.apply(t,T),1!=E&&P.matchGrammar(e,t,n,b,y,!0,l),a)break}else if(a)break}}}}},tokenize:function(e,t,n){var r=[e],i=t.rest;if(i){for(var a in i)t[a]=i[a];delete t.rest}return P.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var n=P.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=P.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}}},o=P.Token=function(e,t,n,r,i){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!i};if(o.stringify=function(t,n,e){if("string"==typeof t)return t;if("Array"===P.util.type(t))return t.map(function(e){return o.stringify(e,n,t)}).join("");var r={type:t.type,content:o.stringify(t.content,n,e),tag:"span",classes:["token",t.type],attributes:{},language:n,parent:e};if(t.alias){var i="Array"===P.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(r.classes,i)}P.hooks.run("wrap",r);var a=Object.keys(r.attributes).map(function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(a?" "+a:"")+">"+r.content+"</"+r.tag+">"},!c.document)return c.addEventListener&&(P.disableWorkerMessageHandler||c.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,r=t.code,i=t.immediateClose;c.postMessage(P.highlight(r,P.languages[n],n)),i&&c.close()},!1)),c.Prism;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(P.filename=e.src,P.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(P.highlightAll):window.setTimeout(P.highlightAll,16):document.addEventListener("DOMContentLoaded",P.highlightAll))),c.Prism}();e.exports&&(e.exports=u),void 0!==t&&(t.Prism=u),u.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},u.languages.markup.tag.inside["attr-value"].inside.entity=u.languages.markup.entity,u.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),u.languages.xml=u.languages.markup,u.languages.html=u.languages.markup,u.languages.mathml=u.languages.markup,u.languages.svg=u.languages.markup,u.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},u.languages.css.atrule.inside.rest=u.languages.css,u.languages.markup&&(u.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:u.languages.css,alias:"language-css",greedy:!0}}),u.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:u.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:u.languages.css}},alias:"language-css"}},u.languages.markup.tag)),u.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},u.languages.javascript=u.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,function:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),u.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),u.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}}}),u.languages.javascript["template-string"].inside.interpolation.inside.rest=u.languages.javascript,u.languages.markup&&u.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:u.languages.javascript,alias:"language-javascript",greedy:!0}}),u.languages.js=u.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var t,n=e.getAttribute("data-src"),r=e,i=/\blang(?:uage)?-([\w-]+)\b/i;r&&!i.test(r.className);)r=r.parentNode;if(r&&(t=(e.className.match(i)||[,""])[1]),!t){var a=(n.match(/\.(\w+)$/)||[,""])[1];t=l[a]||a}var o=document.createElement("code");o.className="language-"+t,e.textContent="",o.textContent="Loading…",e.appendChild(o);var s=new XMLHttpRequest;s.open("GET",n,!0),s.onreadystatechange=function(){4==s.readyState&&(s.status<400&&s.responseText?(o.textContent=s.responseText,u.highlightElement(o)):400<=s.status?o.textContent="✖ Error "+s.status+" while fetching file: "+s.statusText:o.textContent="✖ Error: File does not exist or is empty")},s.send(null)}),u.plugins.toolbar&&u.plugins.toolbar.registerButton("download-file",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-src")&&t.hasAttribute("data-download-link")){var n=t.getAttribute("data-src"),r=document.createElement("a");return r.textContent=t.getAttribute("data-download-link-label")||"Download",r.setAttribute("download",""),r.href=n,r}})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))});function q(e,r){var i=[],a={};return e.forEach(function(e){var t=e.level||1,n=t-1;r<t||(a[n]?a[n].children=(a[n].children||[]).concat(e):i.push(e),a[t]=e)}),i}var H={},I=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g;function B(e){return e.toLowerCase()}function U(e){if("string"!=typeof e)return"";var t=e.trim().replace(/[A-Z]+/g,B).replace(/<[^>\d]+>/g,"").replace(I,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),n=H[t];return n=l.call(H,t)?n+1:0,(H[t]=n)&&(t=t+"-"+n),t}function D(e,t){return'<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/'+t+'.png" alt="'+t+'" />'}U.clear=function(){H={}};var Z=decodeURIComponent,Y=encodeURIComponent;function W(e){var n={};return(e=e.trim().replace(/^(\?|#|&)/,""))&&e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("=");n[t[0]]=t[1]&&Z(t[1])}),n}function G(e,t){void 0===t&&(t=[]);var n=[];for(var r in e)-1<t.indexOf(r)||n.push(e[r]?(Y(r)+"="+Y(e[r])).toLowerCase():Y(r));return n.length?"?"+n.join("&"):""}var X=s(function(e){return/(:|(\/{2}))/g.test(e)}),Q=s(function(e){return/\/$/g.test(e)?e:(e=e.match(/(\S*\/)[^/]+$/))?e[1]:""}),V=s(function(e){return e.replace(/^\/+/,"/").replace(/([^:])\/{2,}/g,"$1/")}),J=s(function(e){for(var t=e.replace(/^\//,"").split("/"),n=[],r=0,i=t.length;r<i;r++){var a=t[r];".."===a?n.pop():"."!==a&&n.push(a)}return"/"+n.join("/")});function K(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return V(e.join("/"))}var ee=s(function(e){return e.replace("#","?id=")});Prism.languages["markup-templating"]={},Object.defineProperties(Prism.languages["markup-templating"],{buildPlaceholders:{value:function(n,r,e,i){n.language===r&&(n.tokenStack=[],n.code=n.code.replace(e,function(e){if("function"==typeof i&&!i(e))return e;for(var t=n.tokenStack.length;-1!==n.code.indexOf("___"+r.toUpperCase()+t+"___");)++t;return n.tokenStack[t]=e,"___"+r.toUpperCase()+t+"___"}),n.grammar=Prism.languages.markup)}},tokenizePlaceholders:{value:function(p,h){if(p.language===h&&p.tokenStack){p.grammar=Prism.languages[h];var d=0,g=Object.keys(p.tokenStack),f=function(e){if(!(d>=g.length))for(var t=0;t<e.length;t++){var n=e[t];if("string"==typeof n||n.content&&"string"==typeof n.content){var r=g[d],i=p.tokenStack[r],a="string"==typeof n?n:n.content,o=a.indexOf("___"+h.toUpperCase()+r+"___");if(-1<o){++d;var s,l=a.substring(0,o),c=new Prism.Token(h,Prism.tokenize(i,p.grammar,h),"language-"+h,i),u=a.substring(o+("___"+h.toUpperCase()+r+"___").length);if(l||u?(s=[l,c,u].filter(function(e){return!!e}),f(s)):s=c,"string"==typeof n?Array.prototype.splice.apply(e,[t,1].concat(s)):n.content=s,d>=g.length)break}}else n.content&&"string"!=typeof n.content&&f(n.content)}};f(p.tokens)}}}});var te={};function ne(e){void 0===e&&(e="");var r={};return e&&(e=e.replace(/^'/,"").replace(/'$/,"").replace(/(?:^|\s):([\w-]+)=?([\w-]+)?/g,function(e,t,n){return r[t]=n&&n.replace(/&quot;/g,"")||!0,""}).trim()),{str:e,config:r}}var re={markdown:function(e){return{url:e}},mermaid:function(e){return{url:e}},iframe:function(e,t){return{html:'<iframe src="'+e+'" '+(t||"width=100% height=400")+"></iframe>"}},video:function(e,t){return{html:'<video src="'+e+'" '+(t||"controls")+">Not Support</video>"}},audio:function(e,t){return{html:'<audio src="'+e+'" '+(t||"controls")+">Not Support</audio>"}},code:function(e,t){var n=e.match(/\.(\w+)$/);return"md"===(n=t||n&&n[1])&&(n="markdown"),{url:e,lang:n}}},ie=function(i,e){var a=this;this.config=i,this.router=e,this.cacheTree={},this.toc=[],this.cacheTOC={},this.linkTarget=i.externalLinkTarget||"_blank",this.contentBase=e.getBasePath();var o,t=this._initRenderer(),n=i.markdown||{};o=u(n)?n(M,t):(M.setOptions(d(n,{renderer:d(t,n.renderer)})),M),this._marked=o,this.compile=function(n){var r=!0,e=s(function(e){r=!1;var t="";return n?(t=c(n)?o(n):o.parser(n),t=i.noEmoji?t:t.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,f&&window.emojify||D).replace(/__colon__/g,":"),U.clear(),t):n})(n),t=a.router.parse().file;return r?a.toc=a.cacheTOC[t]:a.cacheTOC[t]=[].concat(a.toc),e}};ie.prototype.compileEmbed=function(e,t){var n,r=ne(t),i=r.str,a=r.config;if(t=i,a.include){var o;if(X(e)||(e=K(this.contentBase,Q(this.router.getCurrentPath()),e)),a.type&&(o=re[a.type]))(n=o.call(this,e,t)).type=a.type;else{var s="code";/\.(md|markdown)/.test(e)?s="markdown":/\.mmd/.test(e)?s="mermaid":/\.html?/.test(e)?s="iframe":/\.(mp4|ogg)/.test(e)?s="video":/\.mp3/.test(e)&&(s="audio"),(n=re[s].call(this,e,t)).type=s}return n.fragment=a.fragment,n}},ie.prototype._matchNotCompileLink=function(e){for(var t=this.config.noCompileLinks||[],n=0;n<t.length;n++){var r=t[n];if((te[r]||(te[r]=new RegExp("^"+r+"$"))).test(e))return e}},ie.prototype._initRenderer=function(){var e=new M.Renderer,s=this.linkTarget,u=this.router,p=this.contentBase,l=this,t={};return t.heading=e.heading=function(e,t){var n=ne(e),r=n.str,i=n.config,a={level:t,title:r};/{docsify-ignore}/g.test(r)&&(r=r.replace("{docsify-ignore}",""),a.title=r,a.ignoreSubHeading=!0),/{docsify-ignore-all}/g.test(r)&&(r=r.replace("{docsify-ignore-all}",""),a.title=r,a.ignoreAllSubs=!0);var o=U(i.id||r),s=u.toURL(u.getCurrentPath(),{id:o});return a.slug=s,l.toc.push(a),"<h"+t+' id="'+o+'"><a href="'+s+'" data-id="'+o+'" class="anchor"><span>'+r+"</span></a></h"+t+">"},t.code=e.code=function(e,t){return void 0===t&&(t=""),e=e.replace(/@DOCSIFY_QM@/g,"`"),'<pre v-pre data-lang="'+t+'"><code class="lang-'+t+'">'+a.highlight(e,a.languages[t]||a.languages.markup)+"</code></pre>"},t.link=e.link=function(e,t,n){void 0===t&&(t="");var r="",i=ne(t),a=i.str,o=i.config;return t=a,X(e)||l._matchNotCompileLink(e)||o.ignore?r+=0===e.indexOf("mailto:")?"":' target="'+s+'"':(e===l.config.homepage&&(e="README"),e=u.toURL(e,null,u.getCurrentPath())),o.target&&(r+=" target="+o.target),o.disabled&&(r+=" disabled",e="javascript:void(0)"),t&&(r+=' title="'+t+'"'),'<a href="'+e+'"'+r+">"+n+"</a>"},t.paragraph=e.paragraph=function(e){return/^!&gt;/.test(e)?r("tip",e):/^\?&gt;/.test(e)?r("warn",e):"<p>"+e+"</p>"},t.image=e.image=function(e,t,n){var r=e,i="",a=ne(t),o=a.str,s=a.config;t=o,s["no-zoom"]&&(i+=" data-no-zoom"),t&&(i+=' title="'+t+'"');var l=s.size;if(l){var c=l.split("x");c[1]?i+="width="+c[0]+" height="+c[1]:i+="width="+c[0]}return X(e)||(r=K(p,Q(u.getCurrentPath()),e)),'<img src="'+r+'"data-origin="'+e+'" alt="'+n+'"'+i+">"},t.list=e.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+" "+[/<li class="task-list-item">/.test(e.split('class="task-list"')[0])?'class="task-list"':"",n&&1<n?'start="'+n+'"':""].join(" ").trim()+">"+e+"</"+r+">"},t.listitem=e.listitem=function(e){return/^(<input.*type="checkbox"[^>]*>)/.test(e)?'<li class="task-list-item"><label>'+e+"</label></li>":"<li>"+e+"</li>"},e.origin=t,e},ie.prototype.sidebar=function(e,t){var n=this.toc,r=this.router.getCurrentPath(),i="";if(e)i=this.compile(e);else{for(var a=0;a<n.length;a++)if(n[a].ignoreSubHeading){var o=n[a].level;n.splice(a,1);for(var s=a;o<n[s].level&&s<n.length;s++)n.splice(s,1)&&s--&&a++;a--}var l=this.cacheTree[r]||q(n,t);i=R(l,"<ul>{inner}</ul>"),this.cacheTree[r]=l}return i},ie.prototype.subSidebar=function(e){if(e){var t=this.router.getCurrentPath(),n=this.cacheTree,r=this.toc;r[0]&&r[0].ignoreAllSubs&&r.splice(0),r[0]&&1===r[0].level&&r.shift();for(var i=0;i<r.length;i++)r[i].ignoreSubHeading&&r.splice(i,1)&&i--;var a=n[t]||q(r,e);return n[t]=a,this.toc=[],R(a)}this.toc=[]},ie.prototype.article=function(e){return this.compile(e)},ie.prototype.cover=function(e){var t=this.toc.slice(),n=this.compile(e);return this.toc=t.slice(),n};var ae=b.title;function oe(){var e=v("section.cover");if(e){var t=e.getBoundingClientRect().height;window.pageYOffset>=t||e.classList.contains("hidden")?$(y,"add","sticky"):$(y,"remove","sticky")}}function se(e,t,r,n){var i=[];null!=(t=v(t))&&(i=w(t,"a"));var a,o=decodeURI(e.toURL(e.getCurrentPath()));return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=e.getAttribute("href"),n=r?e.parentNode:e;0!==o.indexOf(t)||a?$(n,"remove","active"):(a=e,$(n,"add","active"))}),n&&(b.title=a?a.title||a.innerText+" - "+ae:ae),a}var le=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var ce=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.duration=e.duration||1e3,this.ease=e.easing||this._defaultEase,this.start=e.start,this.end=e.end,this.frame=null,this.next=null,this.isRunning=!1,this.events={},this.direction=this.start<this.end?"up":"down"}return le(t,[{key:"begin",value:function(){return this.isRunning||this.next===this.end||(this.frame=window.requestAnimationFrame(this._tick.bind(this))),this}},{key:"stop",value:function(){return window.cancelAnimationFrame(this.frame),this.isRunning=!1,this.frame=null,this.timeStart=null,this.next=null,this}},{key:"on",value:function(e,t){return this.events[e]=this.events[e]||[],this.events[e].push(t),this}},{key:"emit",value:function(e,t){var n=this,r=this.events[e];r&&r.forEach(function(e){return e.call(n,t)})}},{key:"_tick",value:function(e){this.isRunning=!0;var t=this.next||this.start;this.timeStart||(this.timeStart=e),this.timeElapsed=e-this.timeStart,this.next=Math.round(this.ease(this.timeElapsed,this.start,this.end-this.start,this.duration)),this._shouldTick(t)?(this.emit("tick",this.next),this.frame=window.requestAnimationFrame(this._tick.bind(this))):(this.emit("tick",this.end),this.emit("done",null))}},{key:"_shouldTick",value:function(e){return{up:this.next<this.end&&e<=this.next,down:this.next>this.end&&e>=this.next}[this.direction]}},{key:"_defaultEase",value:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}}]),t}(),ue={},pe=!1,he=null,de=!0,ge=0;function fe(e){if(de){for(var t,n=v(".sidebar"),r=w(".anchor"),i=x(n,".sidebar-nav"),a=x(n,"li.active"),o=document.documentElement,s=(o&&o.scrollTop||document.body.scrollTop)-ge,l=0,c=r.length;l<c;l+=1){var u=r[l];if(u.offsetTop>s){t||(t=u);break}t=u}if(t){var p=ue[me(decodeURIComponent(e),t.getAttribute("data-id"))];if(p&&p!==a&&(a&&a.classList.remove("active"),p.classList.add("active"),a=p,!pe&&y.classList.contains("sticky"))){var h=n.clientHeight,d=a.offsetTop+a.clientHeight+40,g=d-0<h,f=a.offsetTop>=i.scrollTop&&d<=i.scrollTop+h?i.scrollTop:g?0:d-h;n.scrollTop=f}}}}function me(e,t){return e+"?id="+t}function ve(e,t){if(t){var n,r=x("#"+t);r&&(n=r,he&&he.stop(),de=!1,he=new ce({start:window.pageYOffset,end:n.getBoundingClientRect().top+window.pageYOffset,duration:500}).on("tick",function(e){return window.scrollTo(0,e)}).on("done",function(){de=!0,he=null}).begin());var i=ue[me(e,t)],a=x(v(".sidebar"),"li.active");a&&a.classList.remove("active"),i&&i.classList.add("active")}}var be=b.scrollingElement||b.documentElement;var ye={};function ke(e,i){var o=e.compiler,a=e.raw;void 0===a&&(a="");var t=e.fetch,n=ye[a];if(n){var r=n.slice();return r.links=n.links,i(r)}var s=o._marked,l=s.lexer(a),c=[],u=s.InlineLexer.rules.link,p=l.links;l.forEach(function(e,a){"paragraph"===e.type&&(e.text=e.text.replace(new RegExp(u.source,"g"),function(e,t,n,r){var i=o.compileEmbed(n,r);return i&&c.push({index:a,embed:i}),e}))});var h=0;!function(e,a){var t,n=e.embedTokens,o=e.compile,s=(e.fetch,0),l=1;if(!n.length)return a({});for(;t=n[s++];){var r=function(i){return function(e){var t;if(e)if("markdown"===i.embed.type)t=o.lexer(e);else if("code"===i.embed.type){if(i.embed.fragment){var n=i.embed.fragment,r=new RegExp("(?:###|\\/\\/\\/)\\s*\\["+n+"\\]([\\s\\S]*)(?:###|\\/\\/\\/)\\s*\\["+n+"\\]");e=((e.match(r)||[])[1]||"").trim()}t=o.lexer("```"+i.embed.lang+"\n"+e.replace(/`/g,"@DOCSIFY_QM@")+"\n```\n")}else"mermaid"===i.embed.type?(t=[{type:"html",text:'<div class="mermaid">\n'+e+"\n</div>"}]).links={}:(t=[{type:"html",text:e}]).links={};a({token:i,embedToken:t}),++l>=s&&a({})}}(t);t.embed.url?F(t.embed.url).then(r):r(t.embed.html)}}({compile:s,embedTokens:c,fetch:t},function(e){var t=e.embedToken,n=e.token;if(n){var r=n.index+h;d(p,t.links),l=l.slice(0,r).concat(t,l.slice(r+1)),h+=t.length-1}else ye[a]=l.concat(),l.links=ye[a].links=p,i(l)})}function xe(){var e=w(".markdown-section>script").filter(function(e){return!/template/.test(e.type)})[0];if(!e)return!1;var t=e.innerText.trim();if(!t)return!1;setTimeout(function(e){window.__EXECUTE_RESULT__=new Function(t)()},0)}function we(e,t,n){var r,i,a;return t="function"==typeof n?n(t):"string"==typeof n?(i=[],a=0,(r=n).replace(N,function(t,e,n){i.push(r.substring(a,n-1)),a=n+=t.length+1,i.push(function(e){return("00"+("string"==typeof z[t]?e[z[t]]():z[t](e))).slice(-t.length)})}),a!==r.length&&i.push(r.substring(a)),function(e){for(var t="",n=0,r=e||new Date;n<i.length;n++)t+="string"==typeof i[n]?i[n]:i[n](r);return t}(new Date(t))):t,e.replace(/{docsify-updated}/g,t)}function _e(e){e||(e="<h1>404 - Not found</h1>"),this._renderTo(".markdown-section",e),!this.config.loadSidebar&&this._renderSidebar(),!1===this.config.executeScript||void 0===window.Vue||xe()?this.config.executeScript&&xe():setTimeout(function(e){var t=window.__EXECUTE_RESULT__;t&&t.$destroy&&t.$destroy(),window.__EXECUTE_RESULT__=(new window.Vue).$mount("#main")},0)}function Se(e){var t=e.config;e.compiler=new ie(t,e.router),f&&(window.__current_docsify_compiler__=e.compiler);var n,r,i,a,o,s=t.el||"#app",l=x("nav")||_("nav"),c=x(s),u="",p=y;if(c){if(t.repo&&(u+=(a=t.repo)?(/\/\//.test(a)||(a="https://github.com/"+a),'<a href="'+(a=a.replace(/^git\+/,""))+'" class="github-corner" aria-label="View source on Github"><svg viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>'):""),t.coverpage&&(u+=(i=", 100%, 85%",'<section class="cover show" style="background: linear-gradient(to left bottom, hsl('+(Math.floor(255*Math.random())+i)+") 0%,hsl("+(Math.floor(255*Math.random())+i)+') 100%)"><div class="cover-main">\x3c!--cover--\x3e</div><div class="mask"></div></section>')),t.logo){var h=/^data:image/.test(t.logo),d=/(?:http[s]?:)?\/\//.test(t.logo),g=/^\./.test(t.logo);h||d||g||(t.logo=K(e.router.getBasePath(),t.logo))}u+=(r='<button class="sidebar-toggle"><div class="sidebar-toggle-button"><span></span><span></span><span></span></div></button><aside class="sidebar">'+((n=t).name?'<h1 class="app-name"><a class="app-name-link" data-nosearch>'+(n.logo?"<img alt="+n.name+" src="+n.logo+">":n.name)+"</a></h1>":"")+'<div class="sidebar-nav">\x3c!--sidebar--\x3e</div></aside>',(m?r+"<main>":"<main>"+r)+'<section class="content"><article class="markdown-section" id="main">\x3c!--main--\x3e</article></section></main>'),e._renderTo(c,u,!0)}else e.rendered=!0;t.mergeNavbar&&m?p=x(".sidebar"):(l.classList.add("app-nav"),t.repo||l.classList.add("no-badge")),t.loadNavbar&&A(p,l),t.themeColor&&(b.head.appendChild(_("div",(o=t.themeColor,"<style>:root{--theme-color: "+o+";}</style>")).firstElementChild),function(n){if(!(window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)"))){var e=w("style:not(.inserted),link");[].forEach.call(e,function(e){if("STYLE"===e.nodeName)j(e,n);else if("LINK"===e.nodeName){var t=e.getAttribute("href");if(!/\.css$/.test(t))return;F(t).then(function(e){var t=_("style",e);k.appendChild(t),j(t,n)})}})}}(t.themeColor)),e._updateRender(),$(y,"ready")}var Ae={};var Ce=function(e){this.config=e};function Ee(e){var t=location.href.indexOf("#");location.replace(location.href.slice(0,0<=t?t:0)+"#"+e)}Ce.prototype.getBasePath=function(){return this.config.basePath},Ce.prototype.getFile=function(e,t){void 0===e&&(e=this.getCurrentPath());var n,r,i=this.config,a=this.getBasePath(),o="string"==typeof i.ext?i.ext:".md";return e=i.alias?function e(t,n,r){var i=Object.keys(n).filter(function(e){return(Ae[e]||(Ae[e]=new RegExp("^"+e+"$"))).test(t)&&t!==r})[0];return i?e(t.replace(Ae[i],n[i]),n,t):t}(e,i.alias):e,n=e,r=o,e=(e=new RegExp("\\.("+r.replace(/^\./,"")+"|html)$","g").test(n)?n:/\/$/g.test(n)?n+"README"+r:""+n+r)==="/README"+o&&i.homepage||e,e=X(e)?e:K(a,e),t&&(e=e.replace(new RegExp("^"+a),"")),e},Ce.prototype.onchange=function(e){void 0===e&&(e=p),e()},Ce.prototype.getCurrentPath=function(){},Ce.prototype.normalize=function(){},Ce.prototype.parse=function(){},Ce.prototype.toURL=function(e,t,n){var r=n&&"#"===e[0],i=this.parse(ee(e));if(i.query=d({},i.query,t),e=(e=i.path+G(i.query)).replace(/\.md(\?)|\.md$/,"$1"),r){var a=n.indexOf("?");e=(0<a?n.substring(0,a):n)+e}if(this.config.relativePath&&0!==e.indexOf("/")){var o=n.substring(0,n.lastIndexOf("/")+1);return V(J(o+e))}return V("/"+e)};var $e=function(r){function e(e){r.call(this,e),this.mode="hash"}return r&&(e.__proto__=r),((e.prototype=Object.create(r&&r.prototype)).constructor=e).prototype.getBasePath=function(){var e=window.location.pathname||"",t=this.config.basePath;return/^(\/|https?:)/g.test(t)?t:V(e+"/"+t)},e.prototype.getCurrentPath=function(){var e=location.href,t=e.indexOf("#");return-1===t?"":e.slice(t+1)},e.prototype.onchange=function(e){void 0===e&&(e=p),C("hashchange",e)},e.prototype.normalize=function(){var e=this.getCurrentPath();if("/"===(e=ee(e)).charAt(0))return Ee(e);Ee("/"+e)},e.prototype.parse=function(e){void 0===e&&(e=location.href);var t="",n=e.indexOf("#");0<=n&&(e=e.slice(n+1));var r=e.indexOf("?");return 0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),{path:e,file:this.getFile(e,!0),query:W(t)}},e.prototype.toURL=function(e,t,n){return"#"+r.prototype.toURL.call(this,e,t,n)},e}(Ce),Le=function(t){function e(e){t.call(this,e),this.mode="history"}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.getCurrentPath=function(){var e=this.getBasePath(),t=window.location.pathname;return e&&0===t.indexOf(e)&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash},e.prototype.onchange=function(r){void 0===r&&(r=p),C("click",function(e){var t="A"===e.target.tagName?e.target:e.target.parentNode;if("A"===t.tagName&&!/_blank/.test(t.target)){e.preventDefault();var n=t.href;window.history.pushState({key:n},"",n),r()}}),C("popstate",r)},e.prototype.parse=function(e){void 0===e&&(e=location.href);var t="",n=e.indexOf("?");0<=n&&(t=e.slice(n+1),e=e.slice(0,n));var r=K(location.origin),i=e.indexOf(r);return-1<i&&(e=e.slice(i+r.length)),{path:e,file:this.getFile(e),query:W(t)}},e}(Ce);var Te={};function Re(e){e.router.normalize(),e.route=e.router.parse(),y.setAttribute("data-page",e.route.file)}function Pe(e){var t,n,r;t="button.sidebar-toggle",e.router,n=function(e){return y.classList.toggle("close")},null!=(t=v(t))&&(C(t,"click",function(e){e.stopPropagation(),n()}),m&&C(y,"click",function(e){return y.classList.contains("close")&&n()})),r=".sidebar",e.router,null!=(r=v(r))&&C(r,"click",function(e){var t=e.target;"A"===t.nodeName&&t.nextSibling&&t.nextSibling.classList.contains("app-sub-sidebar")&&$(t.parentNode,"collapse")}),e.config.coverpage?!m&&C("scroll",oe):y.classList.add("sticky")}function Oe(t,n,r,i,a,e){t=e?t:t.replace(/\/$/,""),(t=Q(t))&&F(a.router.getFile(t+r)+n,!1,a.config.requestHeaders).then(i,function(e){return Oe(t,n,r,i,a)})}var Fe=Object.freeze({cached:s,hyphenate:o,hasOwn:l,merge:d,isPrimitive:c,noop:p,isFn:u,inBrowser:f,isMobile:m,supportsPushState:g,parseQuery:W,stringifyQuery:G,isAbsolutePath:X,getParentPath:Q,cleanPath:V,resolvePath:J,getPath:K,replaceSlug:ee});function je(){this._init()}var Ne,ze,Me,qe,He=je.prototype;He._init=function(){var n,t,r,e,i,a=this;a.config=function(){var e=d({el:"#app",repo:"",maxLevel:6,subMaxLevel:0,loadSidebar:null,loadNavbar:null,homepage:"README.md",coverpage:"",basePath:"",auto2top:!1,name:"",themeColor:"",nameLink:window.location.pathname,autoHeader:!1,executeScript:null,noEmoji:!1,ga:"",ext:".md",mergeNavbar:!1,formatUpdated:"",externalLinkTarget:"_blank",routerMode:"hash",noCompileLinks:[],relativePath:!1},window.$docsify),t=document.currentScript||[].slice.call(document.getElementsByTagName("script")).filter(function(e){return/docsify\./.test(e.src)})[0];if(t){for(var n in e)if(l.call(e,n)){var r=t.getAttribute("data-"+o(n));c(r)&&(e[n]=""===r||r)}!0===e.loadSidebar&&(e.loadSidebar="_sidebar"+e.ext),!0===e.loadNavbar&&(e.loadNavbar="_navbar"+e.ext),!0===e.coverpage&&(e.coverpage="_coverpage"+e.ext),!0===e.repo&&(e.repo=""),!0===e.name&&(e.name="")}return window.$docsify=e}(),(n=a)._hooks={},n._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var t=n._hooks[e]=[];n._lifecycle[e]=function(e){return t.push(e)}}),[].concat((t=a).config.plugins).forEach(function(e){return u(e)&&e(t._lifecycle,t)}),h(a,"init"),i=(r=a).config,e="history"===(i.routerMode||"hash")&&g?new Le(i):new $e(i),r.router=e,Re(r),Te=r.route,e.onchange(function(e){Re(r),r._updateRender(),Te.path!==r.route.path?(r.$fetch(),Te=r.route):r.$resetEvents()}),Se(a),Pe(a),function(t){var e=t.config.loadSidebar;if(t.rendered){var n=se(t.router,".sidebar-nav",!0,!0);e&&n&&(n.parentNode.innerHTML+=window.__SUB_SIDEBAR__),t._bindEventOnRendered(n),t.$resetEvents(),h(t,"doneEach"),h(t,"ready")}else t.$fetch(function(e){return h(t,"ready")})}(a),h(a,"mounted")},He.route={},(Ne=He)._renderTo=function(e,t,n){var r=v(e);r&&(r[n?"outerHTML":"innerHTML"]=t)},Ne._renderSidebar=function(e){var t=this.config,n=t.maxLevel,r=t.subMaxLevel,i=t.loadSidebar;this._renderTo(".sidebar-nav",this.compiler.sidebar(e,n));var a=se(this.router,".sidebar-nav",!0,!0);i&&a?a.parentNode.innerHTML+=this.compiler.subSidebar(r)||"":this.compiler.subSidebar(),this._bindEventOnRendered(a)},Ne._bindEventOnRendered=function(e){var t,n=this.config,r=n.autoHeader,i=n.auto2top;if(function(e){var t=x(".cover.show");ge=t?t.offsetHeight:0;var n=v(".sidebar"),r=[];null!=n&&(r=w(n,"li"));for(var i=0,a=r.length;i<a;i+=1){var o=r[i],s=o.querySelector("a");if(s){var l=s.getAttribute("href");if("/"!==l){var c=e.parse(l),u=c.query.id,p=c.path;u&&(l=me(p,u))}l&&(ue[decodeURIComponent(l)]=o)}}if(!m){var h=e.getCurrentPath();E("scroll",function(){return fe(h)}),C("scroll",function(){return fe(h)}),C(n,"mouseover",function(){pe=!0}),C(n,"mouseleave",function(){pe=!1})}}(this.router),r&&e){var a=v("#main"),o=a.children[0];if(o&&"H1"!==o.tagName){var s=_("h1");s.innerText=e.innerText,A(a,s)}}i&&(void 0===(t=i)&&(t=0),be.scrollTop=!0===t?0:Number(t))},Ne._renderNav=function(e){e&&this._renderTo("nav",this.compiler.compile(e)),this.config.loadNavbar&&se(this.router,"nav")},Ne._renderMain=function(r,i,a){var o=this;if(void 0===i&&(i={}),!r)return _e.call(this,r);h(this,"beforeEach",r,function(e){var t,n=function(){i.updatedAt&&(t=we(t,i.updatedAt,o.config.formatUpdated)),h(o,"afterEach",t,function(e){return _e.call(o,e)})};o.isHTML?(t=o.result=r,n(),a()):ke({compiler:o.compiler,raw:e},function(e){t=o.compiler.compile(e),n(),a()})})},Ne._renderCover=function(e,t){var n=v(".cover");if($(v("main"),t?"add":"remove","hidden"),e){$(n,"add","show");var r=this.coverIsHTML?e:this.compiler.cover(e),i=r.trim().match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$');if(i){if("color"===i[2])n.style.background=i[1]+(i[3]||"");else{var a=i[1];$(n,"add","has-mask"),X(i[1])||(a=K(this.router.getBasePath(),i[1])),n.style.backgroundImage="url("+a+")",n.style.backgroundSize="cover",n.style.backgroundPosition="center center"}r=r.replace(i[0],"")}this._renderTo(".cover-main",r),oe()}else $(n,"remove","show")},Ne._updateRender=function(){!function(e){var t=v(".app-name-link"),n=e.config.nameLink,r=e.route.path;if(t)if(c(e.config.nameLink))t.setAttribute("href",n);else if("object"==typeof n){var i=Object.keys(n).filter(function(e){return-1<r.indexOf(e)})[0];t.setAttribute("href",n[i])}}(this)},qe=function(e,t,n){return Me&&Me.abort&&Me.abort(),Me=F(e,!0,n)},(ze=He)._loadSideAndNav=function(e,t,n,r){var i=this;return function(){if(!n)return r();Oe(e,t,n,function(e){i._renderSidebar(e),r()},i,!0)}},ze._fetch=function(n){var r=this;void 0===n&&(n=p);var e=this.route,i=e.path,a=G(e.query,["id"]),t=this.config,o=t.loadNavbar,s=t.requestHeaders,l=t.loadSidebar,c=this.router.getFile(i),u=qe(c+a,0,s);this.isHTML=/\.html$/g.test(c),u.then(function(e,t){return r._renderMain(e,t,r._loadSideAndNav(i,a,l,n))},function(e){r._fetchFallbackPage(c,a,n)||r._fetch404(c,a,n)}),o&&Oe(i,a,o,function(e){return r._renderNav(e)},this,!0)},ze._fetchCover=function(){var t=this,e=this.config,n=e.coverpage,r=e.requestHeaders,i=this.route.query,a=Q(this.route.path);if(n){var o=null,s=this.route.path;if("string"==typeof n)"/"===s&&(o=n);else if(Array.isArray(n))o=-1<n.indexOf(s)&&"_coverpage";else{var l=n[s];o=!0===l?"_coverpage":l}var c=Boolean(o)&&this.config.onlyCover;return o?(o=this.router.getFile(a+o),this.coverIsHTML=/\.html$/g.test(o),F(o+G(i,["id"]),!1,r).then(function(e){return t._renderCover(e,c)})):this._renderCover(null,c),c}},ze.$fetch=function(e){var t=this;void 0===e&&(e=p);var n=function(){h(t,"doneEach"),e()};this._fetchCover()?n():this._fetch(function(){t.$resetEvents(),n()})},ze._fetchFallbackPage=function(n,r,i){var a=this;void 0===i&&(i=p);var e=this.config,t=e.requestHeaders,o=e.fallbackLanguages,s=e.loadSidebar;if(!o)return!1;var l=n.split("/")[1];if(-1===o.indexOf(l))return!1;var c=n.replace(new RegExp("^/"+l),"");return qe(c+r,0,t).then(function(e,t){return a._renderMain(e,t,a._loadSideAndNav(n,r,s,i))},function(){return a._fetch404(n,r,i)}),!0},ze._fetch404=function(e,t,n){var r=this;void 0===n&&(n=p);var i=this.config,a=i.loadSidebar,o=i.requestHeaders,s=i.notFoundPage,l=this._loadSideAndNav(e,t,a,n);if(s){var c=function(t,e){var n,r,i=e.notFoundPage,a="_404"+(e.ext||".md");switch(typeof i){case"boolean":r=a;break;case"string":r=i;break;case"object":r=(n=Object.keys(i).sort(function(e,t){return t.length-e.length}).find(function(e){return t.match(new RegExp("^"+e))}))&&i[n]||a}return r}(e,this.config);return qe(this.router.getFile(c),0,o).then(function(e,t){return r._renderMain(e,t,l)},function(){return r._renderMain(null,{},l)}),!0}return this._renderMain(null,{},l),!1},He.$resetEvents=function(){ve(this.route.path,this.route.query.id),this.config.loadNavbar&&se(this.router,"nav")},window.Docsify={util:Fe,dom:e,get:F,slugify:U,version:"4.9.4"},window.DocsifyCompiler=ie,window.marked=M,window.Prism=a,function(e){var t=document.readyState;if("complete"===t||"interactive"===t)return setTimeout(e,0);document.addEventListener("DOMContentLoaded",e)}(function(e){return new je})}();
@@ -0,0 +1 @@
1
+ !function(){var o=["+1","100","1234","8ball","a","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alien","ambulance","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","astonished","athletic_shoe","atm","b","baby","baby_bottle","baby_chick","baby_symbol","back","baggage_claim","balloon","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","bath","bathtub","battery","bear","bee","beer","beers","beetle","beginner","bell","bento","bicyclist","bike","bikini","bird","birthday","black_circle","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bow","bowling","bowtie","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","bulb","bullettrain_front","bullettrain_side","bus","busstop","bust_in_silhouette","busts_in_silhouette","cactus","cake","calendar","calling","camel","camera","cancer","candy","capital_abcd","capricorn","car","card_index","carousel_horse","cat","cat2","cd","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cherries","cherry_blossom","chestnut","chicken","children_crossing","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cl","clap","clapper","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","clubs","cn","cocktail","coffee","cold_sweat","collision","computer","confetti_ball","confounded","confused","congratulations","construction","construction_worker","convenience_store","cookie","cool","cop","copyright","corn","couple","couple_with_heart","couplekiss","cow","cow2","credit_card","crescent_moon","crocodile","crossed_flags","crown","cry","crying_cat_face","crystal_ball","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dancer","dancers","dango","dart","dash","date","de","deciduous_tree","department_store","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dragon","dragon_face","dress","dromedary_camel","droplet","dvd","e-mail","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","end","envelope","envelope_with_arrow","es","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eyeglasses","eyes","facepunch","factory","fallen_leaf","family","fast_forward","fax","fearful","feelsgood","feet","ferris_wheel","file_folder","finnadie","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist","five","flags","flashlight","flipper","floppy_disk","flower_playing_cards","flushed","foggy","football","footprints","fork_and_knife","fountain","four","four_leaf_clover","fr","free","fried_shrimp","fries","frog","frowning","fu","fuelpump","full_moon","full_moon_with_face","game_die","gb","gem","gemini","ghost","gift","gift_heart","girl","globe_with_meridians","goat","goberserk","godmode","golf","grapes","green_apple","green_book","green_heart","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guitar","gun","haircut","hamburger","hammer","hamster","hand","handbag","hankey","hash","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_exclamation_mark","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","honey_pot","honeybee","horse","horse_racing","hospital","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","hurtrealbad","hushed","ice_cream","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","information_desk_person","information_source","innocent","interrobang","iphone","it","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","jp","key","keycap_ten","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","koala","koko","kr","lantern","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","libra","light_rail","link","lips","lipstick","lock","lock_with_ink_pen","lollipop","loop","loud_sound","loudspeaker","love_hotel","love_letter","low_brightness","m","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_with_gua_pi_mao","man_with_turban","mans_shoe","maple_leaf","mask","massage","meat_on_bone","mega","melon","memo","mens","metal","metro","microphone","microscope","milky_way","minibus","minidisc","mobile_phone_off","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mount_fuji","mountain_bicyclist","mountain_cableway","mountain_railway","mouse","mouse2","movie_camera","moyai","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","neckbeard","necktie","negative_squared_cross_mark","neutral_face","new","new_moon","new_moon_with_face","newspaper","ng","night_with_stars","nine","no_bell","no_bicycles","no_entry","no_entry_sign","no_good","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","non-potable_water","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o","o2","ocean","octocat","octopus","oden","office","ok","ok_hand","ok_woman","older_man","older_woman","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","one","open_book","open_file_folder","open_hands","open_mouth","ophiuchus","orange_book","outbox_tray","ox","package","page_facing_up","page_with_curl","pager","palm_tree","panda_face","paperclip","parking","part_alternation_mark","partly_sunny","passport_control","paw_prints","peach","pear","pencil","pencil2","penguin","pensive","performing_arts","persevere","person_frowning","person_with_blond_hair","person_with_pouting_face","phone","pig","pig2","pig_nose","pill","pineapple","pisces","pizza","point_down","point_left","point_right","point_up","point_up_2","police_car","poodle","poop","post_office","postal_horn","postbox","potable_water","pouch","poultry_leg","pound","pouting_cat","pray","princess","punch","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","radio","radio_button","rage","rage1","rage2","rage3","rage4","railway_car","rainbow","raised_hand","raised_hands","raising_hand","ram","ramen","rat","recycle","red_car","red_circle","registered","relaxed","relieved","repeat","repeat_one","restroom","revolving_hearts","rewind","ribbon","rice","rice_ball","rice_cracker","rice_scene","ring","rocket","roller_coaster","rooster","rose","rotating_light","round_pushpin","rowboat","ru","rugby_football","runner","running","running_shirt_with_sash","sa","sagittarius","sailboat","sake","sandal","santa","satellite","satisfied","saxophone","school","school_satchel","scissors","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","seven","shaved_ice","sheep","shell","ship","shipit","shirt","shit","shoe","shower","signal_strength","six","six_pointed_star","ski","skull","sleeping","sleepy","slot_machine","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","snowboarder","snowflake","snowman","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speech_balloon","speedboat","squirrel","star","star2","stars","station","statue_of_liberty","steam_locomotive","stew","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfer","sushi","suspect","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimmer","symbols","syringe","tada","tanabata_tree","tangerine","taurus","taxi","tea","telephone","telephone_receiver","telescope","tennis","tent","thought_balloon","three","thumbsdown","thumbsup","ticket","tiger","tiger2","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trollface","trophy","tropical_drink","tropical_fish","truck","trumpet","tshirt","tulip","turtle","tv","twisted_rightwards_arrows","two","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","uk","umbrella","unamused","underage","unlock","up","us","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","vs","walking","waning_crescent_moon","waning_gibbous_moon","warning","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","waxing_gibbous_moon","wc","weary","wedding","whale","whale2","wheelchair","white_check_mark","white_circle","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wind_chime","wine_glass","wink","wolf","woman","womans_clothes","womans_hat","womens","worried","wrench","x","yellow_heart","yen","yum","zap","zero","zzz"];window.emojify=function(e,a){return-1===o.indexOf(a)?e:'<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/'+a+'.png" alt="'+a+'" />'}}();
@@ -0,0 +1 @@
1
+ !function(){var f={},u={EXPIRE_KEY:"docsify.search.expires",INDEX_KEY:"docsify.search.index"};function h(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(e).replace(/[&<>"'/]/g,function(e){return n[e]})}function o(o,r){var e,n,t="auto"===o.paths,s=(e=o.namespace)?u.EXPIRE_KEY+"/"+e:u.EXPIRE_KEY,c=(n=o.namespace)?u.INDEX_KEY+"/"+n:u.INDEX_KEY,a=localStorage.getItem(s)<Date.now();if(f=JSON.parse(localStorage.getItem(c)),a)f={};else if(!t)return;var i,d,l=t?(i=r.router,d=[],Docsify.dom.findAll(".sidebar-nav a:not(.section-link):not([data-nosearch])").forEach(function(e){var n=e.href,t=e.getAttribute("href"),a=i.parse(n).path;a&&-1===d.indexOf(a)&&!Docsify.util.isAbsolutePath(t)&&d.push(a)}),d):o.paths,h=l.length,p=0;l.forEach(function(i){if(f[i])return p++;Docsify.get(r.router.getFile(i),!1,r.config.requestHeaders).then(function(e){var n,t,a;f[i]=function(n,e,t,a){void 0===e&&(e="");var i,o=window.marked.lexer(e),r=window.Docsify.slugify,s={};return o.forEach(function(e){if("heading"===e.type&&e.depth<=a)i=t.toURL(n,{id:r(e.text)}),s[i]={slug:i,title:e.text,body:""};else{if(!i)return;s[i]?s[i].body?s[i].body+="\n"+(e.text||""):s[i].body=e.text:s[i]={slug:i,title:"",body:""}}}),r.clear(),s}(i,e,r.router,o.depth),h===++p&&(n=o.maxAge,t=s,a=c,localStorage.setItem(t,Date.now()+n),localStorage.setItem(a,JSON.stringify(f)))})})}var c,d="";function s(e){var n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,".results-panel"),a=Docsify.dom.find(n,".clear-button"),i=Docsify.dom.find(".sidebar-nav"),o=Docsify.dom.find(".app-name");if(!e)return t.classList.remove("show"),a.classList.remove("show"),t.innerHTML="",void(c.hideOtherSidebarContent&&(i.classList.remove("hide"),o.classList.remove("hide")));var r=function(e){var i=[],o=[];Object.keys(f).forEach(function(n){o=o.concat(Object.keys(f[n]).map(function(e){return f[n][e]}))});var r=(e=e.trim()).split(/[\s\-,\\/]+/);1!==r.length&&(r=[].concat(e,r));for(var n=function(e){var n=o[e],s=0,c="",d=n.title&&n.title.trim(),l=n.body&&n.body.trim(),t=n.slug||"";if(d&&(r.forEach(function(e){var n,t=new RegExp(e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),"gi"),a=-1;if(n=d?d.search(t):-1,a=l?l.search(t):-1,0<=n||0<=a){s+=0<=n?3:0<=a?2:0,a<0&&(a=0);var i,o=0;(o=0==(i=a<11?0:a-10)?70:a+e.length+60)>l.length&&(o=l.length);var r="..."+h(l).substring(i,o).replace(t,'<em class="search-keyword">'+e+"</em>")+"...";c+=r}}),0<s)){var a={title:h(d),content:l?c:"",url:t,score:s};i.push(a)}},t=0;t<o.length;t++)n(t);return i.sort(function(e,n){return n.score-e.score})}(e),s="";r.forEach(function(e){s+='<div class="matching-post">\n<a href="'+e.url+'">\n<h2>'+e.title+"</h2>\n<p>"+e.content+"</p>\n</a>\n</div>"}),t.classList.add("show"),a.classList.add("show"),t.innerHTML=s||'<p class="empty">'+d+"</p>",c.hideOtherSidebarContent&&(i.classList.add("hide"),o.classList.add("hide"))}function l(e){c=e}function r(e,n){var t,a,i,o,r=n.router.parse().query.s;l(e),Docsify.dom.style("\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0 7px;\n line-height: 36px;\n font-size: 14px;\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"),function(e){void 0===e&&(e="");var n='<div class="input-wrap">\n <input type="search" value="'+e+'" />\n <div class="clear-button">\n <svg width="26" height="24">\n <circle cx="12" cy="12" r="11" fill="#ccc" />\n <path stroke="white" stroke-width="2" d="M8.25,8.25,15.75,15.75" />\n <path stroke="white" stroke-width="2"d="M8.25,15.75,15.75,8.25" />\n </svg>\n </div>\n </div>\n <div class="results-panel"></div>\n </div>',t=Docsify.dom.create("div",n),a=Docsify.dom.find("aside");Docsify.dom.toggleClass(t,"search"),Docsify.dom.before(a,t)}(r),a=Docsify.dom.find("div.search"),i=Docsify.dom.find(a,"input"),o=Docsify.dom.find(a,".input-wrap"),Docsify.dom.on(a,"click",function(e){return"A"!==e.target.tagName&&e.stopPropagation()}),Docsify.dom.on(i,"input",function(n){clearTimeout(t),t=setTimeout(function(e){return s(n.target.value.trim())},100)}),Docsify.dom.on(o,"click",function(e){"INPUT"!==e.target.tagName&&(i.value="",s())}),r&&setTimeout(function(e){return s(r)},500)}function p(e,n){l(e),function(e,n){var t=Docsify.dom.getNode('.search input[type="search"]');if(t)if("string"==typeof e)t.placeholder=e;else{var a=Object.keys(e).filter(function(e){return-1<n.indexOf(e)})[0];t.placeholder=e[a]}}(e.placeholder,n.route.path),function(e,n){if("string"==typeof e)d=e;else{var t=Object.keys(e).filter(function(e){return-1<n.indexOf(e)})[0];d=e[t]}}(e.noData,n.route.path)}var m={placeholder:"Type to search",noData:"No Results!",paths:"auto",depth:2,maxAge:864e5,hideOtherSidebarContent:!1,namespace:void 0};$docsify.plugins=[].concat(function(e,n){var t=Docsify.util,a=n.config.search||m;Array.isArray(a)?m.paths=a:"object"==typeof a&&(m.paths=Array.isArray(a.paths)?a.paths:"auto",m.maxAge=t.isPrimitive(a.maxAge)?a.maxAge:m.maxAge,m.placeholder=a.placeholder||m.placeholder,m.noData=a.noData||m.noData,m.depth=a.depth||m.depth,m.hideOtherSidebarContent=a.hideOtherSidebarContent||m.hideOtherSidebarContent,m.namespace=a.namespace||m.namespace);var i="auto"===m.paths;e.mounted(function(e){r(m,n),!i&&o(m,n)}),e.doneEach(function(e){p(m,n),i&&o(m,n)})},$docsify.plugins)}();
@@ -0,0 +1 @@
1
+ !function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism);
@@ -0,0 +1 @@
1
+ @import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body:not(.ready){overflow:hidden}body:not(.ready) .app-nav,body:not(.ready)>nav,body:not(.ready) [data-cloak]{display:none}div#app{font-size:30px;font-weight:lighter;margin:40vh auto;text-align:center}div#app:empty:before{content:"Loading..."}.emoji{height:1.2rem;vertical-align:middle}.progress{background-color:var(--theme-color,#42b983);height:2px;left:0;position:fixed;right:0;top:0;transition:width .2s,opacity .4s;width:0;z-index:5}.search .search-keyword,.search a:hover{color:var(--theme-color,#42b983)}.search .search-keyword{font-style:normal;font-weight:700}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#34495e;font-family:Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:15px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}a[disabled]{cursor:not-allowed;opacity:.6}kbd{border:1px solid #ccc;border-radius:3px;display:inline-block;font-size:12px!important;line-height:12px;margin-bottom:3px;padding:3px 5px;vertical-align:middle}li input[type=checkbox]{margin:0 .2em .25em 0;vertical-align:middle}.app-nav{margin:25px 60px 0 0;position:absolute;right:0;text-align:right;z-index:2}.app-nav.no-badge{margin-right:25px}.app-nav p{margin:0}.app-nav>a{margin:0 1rem;padding:5px 0}.app-nav li,.app-nav ul{display:inline-block;list-style:none;margin:0}.app-nav a{color:inherit;font-size:16px;text-decoration:none;transition:color .3s}.app-nav a.active,.app-nav a:hover{color:var(--theme-color,#42b983)}.app-nav a.active{border-bottom:2px solid var(--theme-color,#42b983)}.app-nav li{display:inline-block;margin:0 1rem;padding:5px 0;position:relative}.app-nav li ul{background-color:#fff;border:1px solid #ddd;border-bottom-color:#ccc;border-radius:4px;box-sizing:border-box;display:none;max-height:calc(100vh - 61px);overflow-y:auto;padding:10px 0;position:absolute;right:-15px;text-align:left;top:100%;white-space:nowrap}.app-nav li ul li{display:block;font-size:14px;line-height:1rem;margin:0;margin:8px 14px;white-space:nowrap}.app-nav li ul a{display:block;font-size:inherit;margin:0;padding:0}.app-nav li ul a.active{border-bottom:0}.app-nav li:hover ul{display:block}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover .octo-arm{animation:a .56s ease-in-out}.github-corner svg{color:#fff;fill:var(--theme-color,#42b983);height:80px;width:80px}main{display:block;position:relative;width:100vw;height:100%;z-index:0}main.hidden{display:none}.anchor{display:inline-block;text-decoration:none;transition:all .3s}.anchor span{color:#34495e}.anchor:hover{text-decoration:underline}.sidebar{border-right:1px solid rgba(0,0,0,.07);overflow-y:auto;padding:40px 0 0;position:absolute;top:0;bottom:0;left:0;transition:transform .25s ease-out;width:300px;z-index:3}.sidebar>h1{margin:0 auto 1rem;font-size:1.5rem;font-weight:300;text-align:center}.sidebar>h1 a{color:inherit;text-decoration:none}.sidebar>h1 .app-nav{display:block;position:static}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li.collapse .app-sub-sidebar{display:none}.sidebar ul{margin:0 0 0 15px;padding:0}.sidebar li>p{font-weight:700;margin:0}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{border-bottom:none;display:block}.sidebar ul li ul{padding-left:20px}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53%,.1)}.sidebar-toggle{background-color:transparent;background-color:hsla(0,0%,100%,.8);border:0;outline:none;padding:10px;position:absolute;bottom:0;left:0;text-align:center;transition:opacity .3s;width:284px;z-index:4}.sidebar-toggle .sidebar-toggle-button:hover{opacity:.4}.sidebar-toggle span{background-color:var(--theme-color,#42b983);display:block;margin-bottom:4px;width:16px;height:2px}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{padding-top:60px;position:absolute;top:0;right:0;bottom:0;left:300px;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:800px;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section hr{border:none;border-bottom:1px solid #eee;margin:2em 0}.markdown-section iframe{border:1px solid #eee;width:1px;min-width:100%}.markdown-section table{border-collapse:collapse;border-spacing:0;display:block;margin-bottom:1rem;overflow:auto;width:100%}.markdown-section th{font-weight:700}.markdown-section td,.markdown-section th{border:1px solid #ddd;padding:6px 13px}.markdown-section tr{border-top:1px solid #ccc}.markdown-section p.tip,.markdown-section tr:nth-child(2n){background-color:#f8f8f8}.markdown-section p.tip{border-bottom-right-radius:2px;border-left:4px solid #f66;border-top-right-radius:2px;margin:2em 0;padding:12px 24px 12px 30px;position:relative}.markdown-section p.tip:before{background-color:#f66;border-radius:100%;color:#fff;content:"!";font-family:Dosis,Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:14px;font-weight:700;left:-12px;line-height:20px;position:absolute;height:20px;width:20px;text-align:center;top:14px}.markdown-section p.tip code{background-color:#efefef}.markdown-section p.tip em{color:#34495e}.markdown-section p.warn{background:rgba(66,185,131,.1);border-radius:2px;padding:1rem}.markdown-section ul.task-list>li{list-style-type:none}body.close .sidebar{transform:translateX(-300px)}body.close .sidebar-toggle{width:auto}body.close .content{left:0}@media print{.app-nav,.github-corner,.sidebar,.sidebar-toggle{display:none}}@media screen and (max-width:768px){.github-corner,.sidebar,.sidebar-toggle{position:fixed}.app-nav{margin-top:16px}.app-nav li ul{top:30px}main{height:auto;overflow-x:hidden}.sidebar{left:-300px;transition:transform .25s ease-out}.content{left:0;max-width:100vw;position:static;padding-top:20px;transition:transform .25s ease}.app-nav,.github-corner{transition:transform .25s ease-out}.sidebar-toggle{background-color:transparent;width:auto;padding:30px 30px 10px 10px}body.close .sidebar{transform:translateX(300px)}body.close .sidebar-toggle{background-color:hsla(0,0%,100%,.8);transition:background-color 1s;width:284px;padding:10px}body.close .content{transform:translateX(300px)}body.close .app-nav,body.close .github-corner{display:none}.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:a .56s ease-in-out}}@keyframes a{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}section.cover{-ms-flex-align:center;align-items:center;background-position:50%;background-repeat:no-repeat;background-size:cover;height:100vh;display:none}section.cover.show{display:-ms-flexbox;display:flex}section.cover.has-mask .mask{background-color:#fff;opacity:.8;position:absolute;top:0;height:100%;width:100%}section.cover .cover-main{-ms-flex:1;flex:1;margin:-20px 16px 0;text-align:center;z-index:1}section.cover a{color:inherit}section.cover a,section.cover a:hover{text-decoration:none}section.cover p{line-height:1.5rem;margin:1em 0}section.cover h1{color:inherit;font-size:2.5rem;font-weight:300;margin:.625rem 0 2.5rem;position:relative;text-align:center}section.cover h1 a{display:block}section.cover h1 small{bottom:-.4375rem;font-size:1rem;position:absolute}section.cover blockquote{font-size:1.5rem;text-align:center}section.cover ul{line-height:1.8;list-style-type:none;margin:1em auto;max-width:500px;padding:0}section.cover .cover-main>p:last-child a{border:1px solid var(--theme-color,#42b983);border-radius:2rem;box-sizing:border-box;color:var(--theme-color,#42b983);display:inline-block;font-size:1.05rem;letter-spacing:.1rem;margin:.5rem 1rem;padding:.75em 2rem;text-decoration:none;transition:all .15s ease}section.cover .cover-main>p:last-child a:last-child{background-color:var(--theme-color,#42b983);color:#fff}section.cover .cover-main>p:last-child a:last-child:hover{color:inherit;opacity:.8}section.cover .cover-main>p:last-child a:hover{color:inherit}section.cover blockquote>p>a{border-bottom:2px solid var(--theme-color,#42b983);transition:color .3s}section.cover blockquote>p>a:hover{color:var(--theme-color,#42b983)}.sidebar,body{background-color:#fff}.sidebar{color:#364149}.sidebar li{margin:6px 0}.sidebar ul li a{color:#505d6b;font-size:14px;font-weight:400;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.sidebar ul li a:hover{text-decoration:underline}.sidebar ul li ul{padding:0}.sidebar ul li.active>a{border-right:2px solid;color:var(--theme-color,#42b983);font-weight:600}.app-sub-sidebar li:before{content:"-";padding-right:4px;float:left}.markdown-section h1,.markdown-section h2,.markdown-section h3,.markdown-section h4,.markdown-section strong{color:#2c3e50;font-weight:600}.markdown-section a{color:var(--theme-color,#42b983);font-weight:600}.markdown-section h1{font-size:2rem;margin:0 0 1rem}.markdown-section h2{font-size:1.75rem;margin:45px 0 .8rem}.markdown-section h3{font-size:1.5rem;margin:40px 0 .6rem}.markdown-section h4{font-size:1.25rem}.markdown-section h5{font-size:1rem}.markdown-section h6{color:#777;font-size:1rem}.markdown-section figure,.markdown-section p{margin:1.2em 0}.markdown-section ol,.markdown-section p,.markdown-section ul{line-height:1.6rem;word-spacing:.05rem}.markdown-section ol,.markdown-section ul{padding-left:1.5rem}.markdown-section blockquote{border-left:4px solid var(--theme-color,#42b983);color:#858585;margin:2em 0;padding-left:20px}.markdown-section blockquote p{font-weight:600;margin-left:0}.markdown-section iframe{margin:1em 0}.markdown-section em{color:#7f8c8d}.markdown-section code{border-radius:2px;color:#e96900;font-size:.8rem;margin:0 2px;padding:3px 5px;white-space:pre-wrap}.markdown-section code,.markdown-section pre{background-color:#f8f8f8;font-family:Roboto Mono,Monaco,courier,monospace}.markdown-section pre{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;line-height:1.5rem;margin:1.2em 0;overflow:auto;padding:0 1.4rem;position:relative;word-wrap:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8e908c}.token.namespace{opacity:.7}.token.boolean,.token.number{color:#c76b29}.token.punctuation{color:#525252}.token.property{color:#c08b30}.token.tag{color:#2973b7}.token.string{color:var(--theme-color,#42b983)}.token.selector{color:#6679cc}.token.attr-name{color:#2973b7}.language-css .token.string,.style .token.string,.token.entity,.token.url{color:#22a2c9}.token.attr-value,.token.control,.token.directive,.token.unit{color:var(--theme-color,#42b983)}.token.function,.token.keyword{color:#e96900}.token.atrule,.token.regex,.token.statement{color:#22a2c9}.token.placeholder,.token.variable{color:#3d8fd1}.token.deleted{text-decoration:line-through}.token.inserted{border-bottom:1px dotted #202746;text-decoration:none}.token.italic{font-style:italic}.token.bold,.token.important{font-weight:700}.token.important{color:#c94922}.token.entity{cursor:help}.markdown-section pre>code{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;background-color:#f8f8f8;border-radius:2px;color:#525252;display:block;font-family:Roboto Mono,Monaco,courier,monospace;font-size:.8rem;line-height:inherit;margin:0 2px;max-width:inherit;overflow:inherit;padding:2.2em 5px;white-space:inherit}.markdown-section code:after,.markdown-section code:before{letter-spacing:.05rem}code .token{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;min-height:1.5rem}pre:after{color:#ccc;content:attr(data-lang);font-size:.6rem;font-weight:600;height:15px;line-height:15px;padding:5px 10px 0;position:absolute;right:0;text-align:right;top:0}
@@ -0,0 +1,2909 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: String
8
+
9
+ &mdash; Documentation by YARD 0.9.20
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "String";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (S)</a> &raquo;
40
+
41
+
42
+ <span class="title">String</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: String
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">String</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/ctf_party/rot.rb<span class="defines">,<br />
98
+ lib/ctf_party/flag.rb,<br /> lib/ctf_party/base64.rb,<br /> lib/ctf_party/digest.rb</span>
99
+ </dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+ <h2>
107
+ Constant Summary
108
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
109
+ </h2>
110
+
111
+ <dl class="constants">
112
+
113
+ <dt id="flag-classvariable" class="">@@flag =
114
+ <div class="docstring">
115
+ <div class="discussion">
116
+
117
+ <p>The flag configuration hash. See <span class='object_link'><a href="#flag=-class_method" title="String.flag= (method)">flag=</a></span>.</p>
118
+
119
+
120
+ </div>
121
+ </div>
122
+ <div class="tags">
123
+
124
+
125
+ </div>
126
+ </dt>
127
+ <dd><pre class="code"><span class='lbrace'>{</span>
128
+ <span class='label'>prefix:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
129
+ <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
130
+ <span class='label'>enclosing:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>{</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>}</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
131
+ <span class='label'>digest:</span> <span class='kw'>nil</span>
132
+ <span class='rbrace'>}</span></pre></dd>
133
+
134
+ </dl>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <h2>
145
+ Class Method Summary
146
+ <small><a href="#" class="summary_toggle">collapse</a></small>
147
+ </h2>
148
+
149
+ <ul class="summary">
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#flag-class_method" title="flag (class method)">.<strong>flag</strong> &#x21d2; Object </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>Show the actual flag configuration.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#flag=-class_method" title="flag= (class method)">.<strong>flag=</strong>(hash) &#x21d2; Hash </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <span class="summary_desc"><div class='inline'>
193
+ <p>Update the flag configuration.</p>
194
+ </div></span>
195
+
196
+ </li>
197
+
198
+
199
+ </ul>
200
+
201
+ <h2>
202
+ Instance Method Summary
203
+ <small><a href="#" class="summary_toggle">collapse</a></small>
204
+ </h2>
205
+
206
+ <ul class="summary">
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#b64%3F-instance_method" title="#b64? (instance method)">#<strong>b64?</strong>(opts = {}) &#x21d2; Boolean </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'>
226
+ <p>Is the string encoded in base64?.</p>
227
+ </div></span>
228
+
229
+ </li>
230
+
231
+
232
+ <li class="public ">
233
+ <span class="summary_signature">
234
+
235
+ <a href="#flag-instance_method" title="#flag (instance method)">#<strong>flag</strong> &#x21d2; String </a>
236
+
237
+
238
+
239
+ </span>
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ <span class="summary_desc"><div class='inline'>
250
+ <p>Format the current string into the configured flag format.</p>
251
+ </div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#flag!-instance_method" title="#flag! (instance method)">#<strong>flag!</strong> &#x21d2; Object </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <span class="summary_desc"><div class='inline'>
274
+ <p>Format the current string into the configured flag format in place as described for <span class='object_link'><a href="#flag-instance_method" title="String#flag (method)">#flag</a></span>.</p>
275
+ </div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#flag%3F-instance_method" title="#flag? (instance method)">#<strong>flag?</strong> &#x21d2; Boolean </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'>
298
+ <p>Check if the string respect the defined flag format.</p>
299
+ </div></span>
300
+
301
+ </li>
302
+
303
+
304
+ <li class="public ">
305
+ <span class="summary_signature">
306
+
307
+ <a href="#from_b64-instance_method" title="#from_b64 (instance method)">#<strong>from_b64</strong>(opts = {}) &#x21d2; String </a>
308
+
309
+
310
+
311
+ </span>
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <span class="summary_desc"><div class='inline'>
322
+ <p>Decode the string from base64.</p>
323
+ </div></span>
324
+
325
+ </li>
326
+
327
+
328
+ <li class="public ">
329
+ <span class="summary_signature">
330
+
331
+ <a href="#from_b64!-instance_method" title="#from_b64! (instance method)">#<strong>from_b64!</strong>(opts = {}) &#x21d2; nil </a>
332
+
333
+
334
+
335
+ </span>
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ <span class="summary_desc"><div class='inline'>
346
+ <p>Decode the string from base64 in place as described for <span class='object_link'><a href="#from_b64-instance_method" title="String#from_b64 (method)">#from_b64</a></span>.</p>
347
+ </div></span>
348
+
349
+ </li>
350
+
351
+
352
+ <li class="public ">
353
+ <span class="summary_signature">
354
+
355
+ <a href="#md5-instance_method" title="#md5 (instance method)">#<strong>md5</strong> &#x21d2; String </a>
356
+
357
+
358
+
359
+ </span>
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+ <span class="summary_desc"><div class='inline'>
370
+ <p>Calculate the md5 hash of the string.</p>
371
+ </div></span>
372
+
373
+ </li>
374
+
375
+
376
+ <li class="public ">
377
+ <span class="summary_signature">
378
+
379
+ <a href="#md5!-instance_method" title="#md5! (instance method)">#<strong>md5!</strong> &#x21d2; Object </a>
380
+
381
+
382
+
383
+ </span>
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+ <span class="summary_desc"><div class='inline'>
394
+ <p>Calculate the md5 hash of the string in place as described for <span class='object_link'><a href="#md5-instance_method" title="String#md5 (method)">#md5</a></span>.</p>
395
+ </div></span>
396
+
397
+ </li>
398
+
399
+
400
+ <li class="public ">
401
+ <span class="summary_signature">
402
+
403
+ <a href="#rmd160-instance_method" title="#rmd160 (instance method)">#<strong>rmd160</strong> &#x21d2; String </a>
404
+
405
+
406
+
407
+ </span>
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <span class="summary_desc"><div class='inline'>
418
+ <p>Calculate the RIPEMD-160 hash of the string.</p>
419
+ </div></span>
420
+
421
+ </li>
422
+
423
+
424
+ <li class="public ">
425
+ <span class="summary_signature">
426
+
427
+ <a href="#rmd160!-instance_method" title="#rmd160! (instance method)">#<strong>rmd160!</strong> &#x21d2; Object </a>
428
+
429
+
430
+
431
+ </span>
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+ <span class="summary_desc"><div class='inline'>
442
+ <p>Calculate the RIPEMD-160 hash of the string in place as described for <span class='object_link'><a href="#rmd160-instance_method" title="String#rmd160 (method)">#rmd160</a></span>.</p>
443
+ </div></span>
444
+
445
+ </li>
446
+
447
+
448
+ <li class="public ">
449
+ <span class="summary_signature">
450
+
451
+ <a href="#rot-instance_method" title="#rot (instance method)">#<strong>rot</strong>(opts = {}) &#x21d2; String </a>
452
+
453
+
454
+
455
+ </span>
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+ <span class="summary_desc"><div class='inline'>
466
+ <p>“Encrypt / Decrypt” the string with Caesar cipher.</p>
467
+ </div></span>
468
+
469
+ </li>
470
+
471
+
472
+ <li class="public ">
473
+ <span class="summary_signature">
474
+
475
+ <a href="#rot!-instance_method" title="#rot! (instance method)">#<strong>rot!</strong>(opts = {}) &#x21d2; String </a>
476
+
477
+
478
+
479
+ </span>
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+ <span class="summary_desc"><div class='inline'>
490
+ <p>“Encrypt / Decrypt” the string with Caesar cipher in place as described for <span class='object_link'><a href="#rot-instance_method" title="String#rot (method)">#rot</a></span>.</p>
491
+ </div></span>
492
+
493
+ </li>
494
+
495
+
496
+ <li class="public ">
497
+ <span class="summary_signature">
498
+
499
+ <a href="#rot13-instance_method" title="#rot13 (instance method)">#<strong>rot13</strong> &#x21d2; Object </a>
500
+
501
+
502
+
503
+ </span>
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+ <span class="summary_desc"><div class='inline'>
514
+ <p>Alias for <span class='object_link'><a href="#rot-instance_method" title="String#rot (method)">#rot</a></span> with default value ( <tt>rot(shift: 13)</tt> ).</p>
515
+ </div></span>
516
+
517
+ </li>
518
+
519
+
520
+ <li class="public ">
521
+ <span class="summary_signature">
522
+
523
+ <a href="#rot13!-instance_method" title="#rot13! (instance method)">#<strong>rot13!</strong> &#x21d2; Object </a>
524
+
525
+
526
+
527
+ </span>
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+ <span class="summary_desc"><div class='inline'>
538
+ <p>Alias for <span class='object_link'><a href="#rot!-instance_method" title="String#rot! (method)">#rot!</a></span> with default value ( <tt>rot!(shift: 13)</tt> ).</p>
539
+ </div></span>
540
+
541
+ </li>
542
+
543
+
544
+ <li class="public ">
545
+ <span class="summary_signature">
546
+
547
+ <a href="#sha1-instance_method" title="#sha1 (instance method)">#<strong>sha1</strong> &#x21d2; String </a>
548
+
549
+
550
+
551
+ </span>
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+ <span class="summary_desc"><div class='inline'>
562
+ <p>Calculate the sha1 hash of the string.</p>
563
+ </div></span>
564
+
565
+ </li>
566
+
567
+
568
+ <li class="public ">
569
+ <span class="summary_signature">
570
+
571
+ <a href="#sha1!-instance_method" title="#sha1! (instance method)">#<strong>sha1!</strong> &#x21d2; Object </a>
572
+
573
+
574
+
575
+ </span>
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+ <span class="summary_desc"><div class='inline'>
586
+ <p>Calculate the sha1 hash of the string in place as described for <span class='object_link'><a href="#sha1-instance_method" title="String#sha1 (method)">#sha1</a></span>.</p>
587
+ </div></span>
588
+
589
+ </li>
590
+
591
+
592
+ <li class="public ">
593
+ <span class="summary_signature">
594
+
595
+ <a href="#sha2-instance_method" title="#sha2 (instance method)">#<strong>sha2</strong>(opts = {}) &#x21d2; String </a>
596
+
597
+
598
+
599
+ </span>
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+ <span class="summary_desc"><div class='inline'>
610
+ <p>Calculate the sha2 hash of the string.</p>
611
+ </div></span>
612
+
613
+ </li>
614
+
615
+
616
+ <li class="public ">
617
+ <span class="summary_signature">
618
+
619
+ <a href="#sha2!-instance_method" title="#sha2! (instance method)">#<strong>sha2!</strong>(opts = {}) &#x21d2; Object </a>
620
+
621
+
622
+
623
+ </span>
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+ <span class="summary_desc"><div class='inline'>
634
+ <p>Calculate the sha2 hash of the string in place as described for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span>.</p>
635
+ </div></span>
636
+
637
+ </li>
638
+
639
+
640
+ <li class="public ">
641
+ <span class="summary_signature">
642
+
643
+ <a href="#sha2_256-instance_method" title="#sha2_256 (instance method)">#<strong>sha2_256</strong> &#x21d2; Object </a>
644
+
645
+
646
+
647
+ </span>
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+ <span class="summary_desc"><div class='inline'>
658
+ <p>Alias for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span> with default value ( <tt>sha2(bitlen: 256)</tt> ).</p>
659
+ </div></span>
660
+
661
+ </li>
662
+
663
+
664
+ <li class="public ">
665
+ <span class="summary_signature">
666
+
667
+ <a href="#sha2_256!-instance_method" title="#sha2_256! (instance method)">#<strong>sha2_256!</strong> &#x21d2; Object </a>
668
+
669
+
670
+
671
+ </span>
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+ <span class="summary_desc"><div class='inline'>
682
+ <p>Alias for <span class='object_link'><a href="#sha2!-instance_method" title="String#sha2! (method)">#sha2!</a></span> with default value ( <tt>sha2!(bitlen: 256)</tt> ).</p>
683
+ </div></span>
684
+
685
+ </li>
686
+
687
+
688
+ <li class="public ">
689
+ <span class="summary_signature">
690
+
691
+ <a href="#sha2_384-instance_method" title="#sha2_384 (instance method)">#<strong>sha2_384</strong> &#x21d2; Object </a>
692
+
693
+
694
+
695
+ </span>
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+ <span class="summary_desc"><div class='inline'>
706
+ <p>Alias for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span> with default value ( <tt>sha2(bitlen: 384)</tt> ).</p>
707
+ </div></span>
708
+
709
+ </li>
710
+
711
+
712
+ <li class="public ">
713
+ <span class="summary_signature">
714
+
715
+ <a href="#sha2_384!-instance_method" title="#sha2_384! (instance method)">#<strong>sha2_384!</strong> &#x21d2; Object </a>
716
+
717
+
718
+
719
+ </span>
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+ <span class="summary_desc"><div class='inline'>
730
+ <p>Alias for <span class='object_link'><a href="#sha2!-instance_method" title="String#sha2! (method)">#sha2!</a></span> with default value ( <tt>sha2!(bitlen: 384)</tt> ).</p>
731
+ </div></span>
732
+
733
+ </li>
734
+
735
+
736
+ <li class="public ">
737
+ <span class="summary_signature">
738
+
739
+ <a href="#sha2_512-instance_method" title="#sha2_512 (instance method)">#<strong>sha2_512</strong> &#x21d2; Object </a>
740
+
741
+
742
+
743
+ </span>
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+ <span class="summary_desc"><div class='inline'>
754
+ <p>Alias for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span> with default value ( <tt>sha2(bitlen: 512)</tt> ).</p>
755
+ </div></span>
756
+
757
+ </li>
758
+
759
+
760
+ <li class="public ">
761
+ <span class="summary_signature">
762
+
763
+ <a href="#sha2_512!-instance_method" title="#sha2_512! (instance method)">#<strong>sha2_512!</strong> &#x21d2; Object </a>
764
+
765
+
766
+
767
+ </span>
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+ <span class="summary_desc"><div class='inline'>
778
+ <p>Alias for <span class='object_link'><a href="#sha2!-instance_method" title="String#sha2! (method)">#sha2!</a></span> with default value ( <tt>sha2!(bitlen: 512)</tt> ).</p>
779
+ </div></span>
780
+
781
+ </li>
782
+
783
+
784
+ <li class="public ">
785
+ <span class="summary_signature">
786
+
787
+ <a href="#to_b64-instance_method" title="#to_b64 (instance method)">#<strong>to_b64</strong>(opts = {}) &#x21d2; String </a>
788
+
789
+
790
+
791
+ </span>
792
+
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+ <span class="summary_desc"><div class='inline'>
802
+ <p>Encode the string into base64.</p>
803
+ </div></span>
804
+
805
+ </li>
806
+
807
+
808
+ <li class="public ">
809
+ <span class="summary_signature">
810
+
811
+ <a href="#to_b64!-instance_method" title="#to_b64! (instance method)">#<strong>to_b64!</strong>(opts = {}) &#x21d2; nil </a>
812
+
813
+
814
+
815
+ </span>
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+ <span class="summary_desc"><div class='inline'>
826
+ <p>Encode the string into base64 in place as described for <span class='object_link'><a href="#to_b64-instance_method" title="String#to_b64 (method)">#to_b64</a></span>.</p>
827
+ </div></span>
828
+
829
+ </li>
830
+
831
+
832
+ </ul>
833
+
834
+
835
+
836
+
837
+ <div id="class_method_details" class="method_details_list">
838
+ <h2>Class Method Details</h2>
839
+
840
+
841
+ <div class="method_details first">
842
+ <h3 class="signature first" id="flag-class_method">
843
+
844
+ .<strong>flag</strong> &#x21d2; <tt>Object</tt>
845
+
846
+
847
+
848
+
849
+
850
+ </h3><div class="docstring">
851
+ <div class="discussion">
852
+
853
+ <p>Show the actual flag configuration. See <span class='object_link'><a href="#flag=-class_method" title="String.flag= (method)">flag=</a></span>.</p>
854
+
855
+
856
+ </div>
857
+ </div>
858
+ <div class="tags">
859
+
860
+
861
+ </div><table class="source_code">
862
+ <tr>
863
+ <td>
864
+ <pre class="lines">
865
+
866
+
867
+ 15
868
+ 16
869
+ 17</pre>
870
+ </td>
871
+ <td>
872
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/flag.rb', line 15</span>
873
+
874
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_flag'>flag</span>
875
+ <span class='cvar'>@@flag</span>
876
+ <span class='kw'>end</span></pre>
877
+ </td>
878
+ </tr>
879
+ </table>
880
+ </div>
881
+
882
+ <div class="method_details ">
883
+ <h3 class="signature " id="flag=-class_method">
884
+
885
+ .<strong>flag=</strong>(hash) &#x21d2; <tt>Hash</tt>
886
+
887
+
888
+
889
+
890
+
891
+ </h3><div class="docstring">
892
+ <div class="discussion">
893
+
894
+ <div class="note notetag">
895
+ <strong>Note:</strong>
896
+ <div class='inline'>
897
+ <p>You can provide the full hash or only the key to update.</p>
898
+ </div>
899
+ </div>
900
+
901
+
902
+ <p>Update the flag configuration.</p>
903
+
904
+
905
+ </div>
906
+ </div>
907
+ <div class="tags">
908
+
909
+ <div class="examples">
910
+ <p class="tag_title">Examples:</p>
911
+
912
+
913
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_flag'><span class='object_link'><a href="#flag-class_method" title="String.flag (method)">flag</a></span></span> <span class='comment'># =&gt; {:prefix=&gt;&quot;&quot;, :suffix=&gt;&quot;&quot;, :enclosing=&gt;[&quot;{&quot;, &quot;}&quot;], :digest=&gt;nil}
914
+ </span><span class='const'><span class='object_link'><a href="" title="String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_flag'><span class='object_link'><a href="#flag-class_method" title="String.flag (method)">flag</a></span></span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>prefix:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sigsegv</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>digest:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>md5</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
915
+ <span class='const'><span class='object_link'><a href="" title="String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_flag'><span class='object_link'><a href="#flag-class_method" title="String.flag (method)">flag</a></span></span> <span class='comment'># =&gt; {:prefix=&gt;&quot;sigsegv&quot;, :suffix=&gt;&quot;&quot;, :enclosing=&gt;[&quot;{&quot;, &quot;}&quot;], :digest=&gt;&quot;md5&quot;}
916
+ </span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>this_1s_a_fl4g</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_flag'>flag</span> <span class='comment'># =&gt; &quot;sigsegv{a5bec9e2a86b6b70d288451eb38dfec8}&quot;</span></code></pre>
917
+
918
+ </div>
919
+ <p class="tag_title">Parameters:</p>
920
+ <ul class="param">
921
+
922
+ <li>
923
+
924
+ <span class='name'>hash</span>
925
+
926
+
927
+ <span class='type'>(<tt>Hash</tt>)</span>
928
+
929
+
930
+
931
+ &mdash;
932
+ <div class='inline'>
933
+ <p>flag configuration</p>
934
+ </div>
935
+
936
+ </li>
937
+
938
+ </ul>
939
+
940
+
941
+
942
+
943
+ <p class="tag_title">Options Hash (<tt>hash</tt>):</p>
944
+ <ul class="option">
945
+
946
+ <li>
947
+ <span class="name">:prefix</span>
948
+ <span class="type">(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
949
+ <span class="default">
950
+
951
+ </span>
952
+
953
+ &mdash; <div class='inline'>
954
+ <p>prefix of the flag. Default: none.</p>
955
+ </div>
956
+
957
+ </li>
958
+
959
+ <li>
960
+ <span class="name">:suffix</span>
961
+ <span class="type">(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
962
+ <span class="default">
963
+
964
+ </span>
965
+
966
+ &mdash; <div class='inline'>
967
+ <p>suffix of the flag. Default: none.</p>
968
+ </div>
969
+
970
+ </li>
971
+
972
+ <li>
973
+ <span class="name">:enclosing</span>
974
+ <span class="type">(<tt>Array&lt;<span class='object_link'><a href="" title="String (class)">String</a></span>&gt;</tt>)</span>
975
+ <span class="default">
976
+
977
+ </span>
978
+
979
+ &mdash; <div class='inline'>
980
+ <p>the characters used to surround the flag. Default are curly braces: <tt>{</tt>, <tt>}</tt>. The array must contain exactly 2 elements.</p>
981
+ </div>
982
+
983
+ </li>
984
+
985
+ <li>
986
+ <span class="name">:digest</span>
987
+ <span class="type">(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
988
+ <span class="default">
989
+
990
+ </span>
991
+
992
+ &mdash; <div class='inline'>
993
+ <p>the hash algorithm to apply on the flag. Default: none. Allowed values: md5, sha1, sha2_256, sha2_384, sha2_512, rmd160.</p>
994
+ </div>
995
+
996
+ </li>
997
+
998
+ </ul>
999
+
1000
+
1001
+ <p class="tag_title">Returns:</p>
1002
+ <ul class="return">
1003
+
1004
+ <li>
1005
+
1006
+
1007
+ <span class='type'>(<tt>Hash</tt>)</span>
1008
+
1009
+
1010
+
1011
+ &mdash;
1012
+ <div class='inline'>
1013
+ <p>hash of the updated options.</p>
1014
+ </div>
1015
+
1016
+ </li>
1017
+
1018
+ </ul>
1019
+
1020
+ </div><table class="source_code">
1021
+ <tr>
1022
+ <td>
1023
+ <pre class="lines">
1024
+
1025
+
1026
+ 38
1027
+ 39
1028
+ 40
1029
+ 41</pre>
1030
+ </td>
1031
+ <td>
1032
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/flag.rb', line 38</span>
1033
+
1034
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_flag='>flag=</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
1035
+ <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_select!'>select!</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid__v'>_v</span><span class='op'>|</span> <span class='cvar'>@@flag</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1036
+ <span class='cvar'>@@flag</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
1037
+ <span class='kw'>end</span></pre>
1038
+ </td>
1039
+ </tr>
1040
+ </table>
1041
+ </div>
1042
+
1043
+ </div>
1044
+
1045
+ <div id="instance_method_details" class="method_details_list">
1046
+ <h2>Instance Method Details</h2>
1047
+
1048
+
1049
+ <div class="method_details first">
1050
+ <h3 class="signature first" id="b64?-instance_method">
1051
+
1052
+ #<strong>b64?</strong>(opts = {}) &#x21d2; <tt>Boolean</tt>
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+ </h3><div class="docstring">
1059
+ <div class="discussion">
1060
+
1061
+ <p>Is the string encoded in base64?</p>
1062
+
1063
+
1064
+ </div>
1065
+ </div>
1066
+ <div class="tags">
1067
+
1068
+ <div class="examples">
1069
+ <p class="tag_title">Examples:</p>
1070
+
1071
+
1072
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SGVsbG8gd29ybGQh</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_b64?'>b64?</span> <span class='comment'># =&gt; true
1073
+ </span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SGVsbG8g@@d29ybGQh</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_b64?'>b64?</span> <span class='comment'># =&gt; false</span></code></pre>
1074
+
1075
+ </div>
1076
+ <p class="tag_title">Parameters:</p>
1077
+ <ul class="param">
1078
+
1079
+ <li>
1080
+
1081
+ <span class='name'>opts</span>
1082
+
1083
+
1084
+ <span class='type'>(<tt>Hash</tt>)</span>
1085
+
1086
+
1087
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1088
+
1089
+
1090
+ &mdash;
1091
+ <div class='inline'>
1092
+ <p>optional parameters</p>
1093
+ </div>
1094
+
1095
+ </li>
1096
+
1097
+ </ul>
1098
+
1099
+
1100
+
1101
+
1102
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1103
+ <ul class="option">
1104
+
1105
+ <li>
1106
+ <span class="name">:mode</span>
1107
+ <span class="type">(<tt>Symbol</tt>)</span>
1108
+ <span class="default">
1109
+
1110
+ </span>
1111
+
1112
+ &mdash; <div class='inline'>
1113
+ <p>Default value: <code>:strict</code>. Other values are <code>:strict</code> (<code>:rfc4648</code>) or <code>:urlsafe</code>.</p>
1114
+ </div>
1115
+
1116
+ </li>
1117
+
1118
+ </ul>
1119
+
1120
+
1121
+ <p class="tag_title">Returns:</p>
1122
+ <ul class="return">
1123
+
1124
+ <li>
1125
+
1126
+
1127
+ <span class='type'>(<tt>Boolean</tt>)</span>
1128
+
1129
+
1130
+
1131
+ &mdash;
1132
+ <div class='inline'>
1133
+ <p><code>true</code> if the string is a valid base64 string, <code>false</code> else.</p>
1134
+ </div>
1135
+
1136
+ </li>
1137
+
1138
+ </ul>
1139
+
1140
+ <p class="tag_title">See Also:</p>
1141
+ <ul class="see">
1142
+
1143
+ <li><a href="https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html">https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html</a></li>
1144
+
1145
+ </ul>
1146
+
1147
+ </div><table class="source_code">
1148
+ <tr>
1149
+ <td>
1150
+ <pre class="lines">
1151
+
1152
+
1153
+ 77
1154
+ 78
1155
+ 79
1156
+ 80
1157
+ 81
1158
+ 82
1159
+ 83
1160
+ 84
1161
+ 85
1162
+ 86
1163
+ 87
1164
+ 88
1165
+ 89
1166
+ 90
1167
+ 91
1168
+ 92
1169
+ 93
1170
+ 94
1171
+ 95
1172
+ 96
1173
+ 97
1174
+ 98</pre>
1175
+ </td>
1176
+ <td>
1177
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/base64.rb', line 77</span>
1178
+
1179
+ <span class='kw'>def</span> <span class='id identifier rubyid_b64?'>b64?</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1180
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='symbol'>:strict</span>
1181
+ <span class='id identifier rubyid_b64'>b64</span> <span class='op'>=</span> <span class='kw'>false</span>
1182
+ <span class='comment'># https://www.rexegg.com/regex-ruby.html
1183
+ </span> <span class='id identifier rubyid_reg1'>reg1</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>%r{</span><span class='tstring_content'>\A(?:[a-zA-Z0-9+/]{4})*(?:|(?:[a-zA-Z0-9+/]{3}=)|
1184
+ (?:[a-zA-Z0-9+/]{2}==)|(?:[a-zA-Z0-9+/]{1}===))\Z</span><span class='regexp_end'>}xn</span></span>
1185
+ <span class='id identifier rubyid_reg3'>reg3</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A(?:[a-zA-Z0-9\-_]{4})*(?:|(?:[a-zA-Z0-9\-_]{3}=)|
1186
+ (?:[a-zA-Z0-9\-_]{2}==)|(?:[a-zA-Z0-9\-_]{1}===))\Z</span><span class='regexp_end'>/xn</span></span>
1187
+ <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:strict</span> <span class='op'>||</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc4648</span>
1188
+ <span class='id identifier rubyid_b64'>b64</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_reg1'>reg1</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1189
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc2045</span>
1190
+ <span class='id identifier rubyid_b64'>b64</span> <span class='op'>=</span> <span class='kw'>true</span>
1191
+ <span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span>
1192
+ <span class='id identifier rubyid_b64'>b64</span> <span class='op'>=</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_reg1'>reg1</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_s'>s</span><span class='rparen'>)</span>
1193
+ <span class='kw'>end</span>
1194
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:urlsafe</span>
1195
+ <span class='id identifier rubyid_b64'>b64</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_reg3'>reg3</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1196
+ <span class='kw'>else</span>
1197
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Wrong mode</span><span class='tstring_end'>&#39;</span></span>
1198
+ <span class='kw'>end</span>
1199
+ <span class='kw'>return</span> <span class='id identifier rubyid_b64'>b64</span>
1200
+ <span class='kw'>end</span></pre>
1201
+ </td>
1202
+ </tr>
1203
+ </table>
1204
+ </div>
1205
+
1206
+ <div class="method_details ">
1207
+ <h3 class="signature " id="flag-instance_method">
1208
+
1209
+ #<strong>flag</strong> &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+ </h3><div class="docstring">
1216
+ <div class="discussion">
1217
+
1218
+ <p>Format the current string into the configured flag format. See <span class='object_link'><a href="#flag=-class_method" title="String.flag= (method)">flag=</a></span> example.</p>
1219
+
1220
+
1221
+ </div>
1222
+ </div>
1223
+ <div class="tags">
1224
+
1225
+ <p class="tag_title">Returns:</p>
1226
+ <ul class="return">
1227
+
1228
+ <li>
1229
+
1230
+
1231
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
1232
+
1233
+
1234
+
1235
+ &mdash;
1236
+ <div class='inline'>
1237
+ <p>the format flag.</p>
1238
+ </div>
1239
+
1240
+ </li>
1241
+
1242
+ </ul>
1243
+
1244
+ </div><table class="source_code">
1245
+ <tr>
1246
+ <td>
1247
+ <pre class="lines">
1248
+
1249
+
1250
+ 48
1251
+ 49
1252
+ 50
1253
+ 51
1254
+ 52
1255
+ 53
1256
+ 54
1257
+ 55
1258
+ 56
1259
+ 57
1260
+ 58
1261
+ 59
1262
+ 60
1263
+ 61
1264
+ 62
1265
+ 63
1266
+ 64
1267
+ 65
1268
+ 66
1269
+ 67
1270
+ 68
1271
+ 69
1272
+ 70
1273
+ 71
1274
+ 72</pre>
1275
+ </td>
1276
+ <td>
1277
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/flag.rb', line 48</span>
1278
+
1279
+ <span class='kw'>def</span> <span class='id identifier rubyid_flag'>flag</span>
1280
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1281
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='rbracket'>]</span>
1282
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:enclosing</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
1283
+ <span class='kw'>if</span> <span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:digest</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1284
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='kw'>self</span>
1285
+ <span class='kw'>else</span>
1286
+ <span class='kw'>case</span> <span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:digest</span><span class='rbracket'>]</span>
1287
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>md5</span><span class='tstring_end'>&#39;</span></span>
1288
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='id identifier rubyid_md5'>md5</span>
1289
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sha1</span><span class='tstring_end'>&#39;</span></span>
1290
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='id identifier rubyid_sha1'>sha1</span>
1291
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sha2_256</span><span class='tstring_end'>&#39;</span></span>
1292
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='id identifier rubyid_sha2_256'>sha2_256</span>
1293
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sha2_384</span><span class='tstring_end'>&#39;</span></span>
1294
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='id identifier rubyid_sha2_384'>sha2_384</span>
1295
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>sha2_512</span><span class='tstring_end'>&#39;</span></span>
1296
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='id identifier rubyid_sha2_512'>sha2_512</span>
1297
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rmd160</span><span class='tstring_end'>&#39;</span></span>
1298
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='id identifier rubyid_rmd160'>rmd160</span>
1299
+ <span class='kw'>end</span>
1300
+ <span class='kw'>end</span>
1301
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+=</span> <span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:enclosing</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
1302
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>+</span> <span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:suffix</span><span class='rbracket'>]</span>
1303
+ <span class='kw'>end</span></pre>
1304
+ </td>
1305
+ </tr>
1306
+ </table>
1307
+ </div>
1308
+
1309
+ <div class="method_details ">
1310
+ <h3 class="signature " id="flag!-instance_method">
1311
+
1312
+ #<strong>flag!</strong> &#x21d2; <tt>Object</tt>
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+ </h3><div class="docstring">
1319
+ <div class="discussion">
1320
+
1321
+ <p>Format the current string into the configured flag format in place as described for <span class='object_link'><a href="#flag-instance_method" title="String#flag (method)">#flag</a></span>.</p>
1322
+
1323
+
1324
+ </div>
1325
+ </div>
1326
+ <div class="tags">
1327
+
1328
+
1329
+ </div><table class="source_code">
1330
+ <tr>
1331
+ <td>
1332
+ <pre class="lines">
1333
+
1334
+
1335
+ 76
1336
+ 77
1337
+ 78</pre>
1338
+ </td>
1339
+ <td>
1340
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/flag.rb', line 76</span>
1341
+
1342
+ <span class='kw'>def</span> <span class='id identifier rubyid_flag!'>flag!</span>
1343
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_flag'>flag</span><span class='rparen'>)</span>
1344
+ <span class='kw'>end</span></pre>
1345
+ </td>
1346
+ </tr>
1347
+ </table>
1348
+ </div>
1349
+
1350
+ <div class="method_details ">
1351
+ <h3 class="signature " id="flag?-instance_method">
1352
+
1353
+ #<strong>flag?</strong> &#x21d2; <tt>Boolean</tt>
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+ </h3><div class="docstring">
1360
+ <div class="discussion">
1361
+
1362
+ <p>Check if the string respect the defined flag format.</p>
1363
+
1364
+
1365
+ </div>
1366
+ </div>
1367
+ <div class="tags">
1368
+
1369
+ <div class="examples">
1370
+ <p class="tag_title">Examples:</p>
1371
+
1372
+
1373
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_flag'><span class='object_link'><a href="#flag-class_method" title="String.flag (method)">flag</a></span></span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>prefix:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>flag</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
1374
+ <span class='id identifier rubyid_flag'>flag</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Brav0!</span><span class='tstring_end'>&#39;</span></span>
1375
+ <span class='id identifier rubyid_flag'>flag</span><span class='period'>.</span><span class='id identifier rubyid_flag!'>flag!</span> <span class='comment'># =&gt; &quot;flag{Brav0!}&quot;
1376
+ </span><span class='id identifier rubyid_flag'>flag</span><span class='period'>.</span><span class='id identifier rubyid_flag?'>flag?</span> <span class='comment'># =&gt; true
1377
+ </span><span class='id identifier rubyid_flag'>flag</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ctf{Brav0!}</span><span class='tstring_end'>&#39;</span></span>
1378
+ <span class='id identifier rubyid_flag'>flag</span><span class='period'>.</span><span class='id identifier rubyid_flag?'>flag?</span> <span class='comment'># =&gt; false</span></code></pre>
1379
+
1380
+ </div>
1381
+
1382
+ <p class="tag_title">Returns:</p>
1383
+ <ul class="return">
1384
+
1385
+ <li>
1386
+
1387
+
1388
+ <span class='type'>(<tt>Boolean</tt>)</span>
1389
+
1390
+
1391
+
1392
+ &mdash;
1393
+ <div class='inline'>
1394
+ <p>true if it respects the configured flag format. but it does not check digest used.</p>
1395
+ </div>
1396
+
1397
+ </li>
1398
+
1399
+ </ul>
1400
+
1401
+ </div><table class="source_code">
1402
+ <tr>
1403
+ <td>
1404
+ <pre class="lines">
1405
+
1406
+
1407
+ 90
1408
+ 91
1409
+ 92
1410
+ 93</pre>
1411
+ </td>
1412
+ <td>
1413
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/flag.rb', line 90</span>
1414
+
1415
+ <span class='kw'>def</span> <span class='id identifier rubyid_flag?'>flag?</span>
1416
+ <span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:enclosing</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>[[:print:]]+
1417
+ </span><span class='embexpr_beg'>#{</span><span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:enclosing</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='cvar'>@@flag</span><span class='lbracket'>[</span><span class='symbol'>:suffix</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='regexp_end'>/ox</span></span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1418
+ <span class='kw'>end</span></pre>
1419
+ </td>
1420
+ </tr>
1421
+ </table>
1422
+ </div>
1423
+
1424
+ <div class="method_details ">
1425
+ <h3 class="signature " id="from_b64-instance_method">
1426
+
1427
+ #<strong>from_b64</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+ </h3><div class="docstring">
1434
+ <div class="discussion">
1435
+
1436
+ <p>Decode the string from base64</p>
1437
+
1438
+
1439
+ </div>
1440
+ </div>
1441
+ <div class="tags">
1442
+
1443
+ <div class="examples">
1444
+ <p class="tag_title">Examples:</p>
1445
+
1446
+
1447
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UnVieQ==</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_from_b64'>from_b64</span> <span class='comment'># =&gt; &quot;Ruby&quot;</span></code></pre>
1448
+
1449
+ </div>
1450
+ <p class="tag_title">Parameters:</p>
1451
+ <ul class="param">
1452
+
1453
+ <li>
1454
+
1455
+ <span class='name'>opts</span>
1456
+
1457
+
1458
+ <span class='type'>(<tt>Hash</tt>)</span>
1459
+
1460
+
1461
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1462
+
1463
+
1464
+ &mdash;
1465
+ <div class='inline'>
1466
+ <p>optional parameters</p>
1467
+ </div>
1468
+
1469
+ </li>
1470
+
1471
+ </ul>
1472
+
1473
+
1474
+
1475
+
1476
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1477
+ <ul class="option">
1478
+
1479
+ <li>
1480
+ <span class="name">:mode</span>
1481
+ <span class="type">(<tt>Symbol</tt>)</span>
1482
+ <span class="default">
1483
+
1484
+ </span>
1485
+
1486
+ &mdash; <div class='inline'>
1487
+ <p>Default value: <code>:strict</code>. Other values are <code>:strict</code> (<code>:rfc4648</code>) or <code>:urlsafe</code>.</p>
1488
+ </div>
1489
+
1490
+ </li>
1491
+
1492
+ </ul>
1493
+
1494
+
1495
+ <p class="tag_title">Returns:</p>
1496
+ <ul class="return">
1497
+
1498
+ <li>
1499
+
1500
+
1501
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
1502
+
1503
+
1504
+
1505
+ &mdash;
1506
+ <div class='inline'>
1507
+ <p>the Base64 decoded string</p>
1508
+ </div>
1509
+
1510
+ </li>
1511
+
1512
+ </ul>
1513
+
1514
+ <p class="tag_title">See Also:</p>
1515
+ <ul class="see">
1516
+
1517
+ <li><a href="https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html">https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html</a></li>
1518
+
1519
+ </ul>
1520
+
1521
+ </div><table class="source_code">
1522
+ <tr>
1523
+ <td>
1524
+ <pre class="lines">
1525
+
1526
+
1527
+ 45
1528
+ 46
1529
+ 47
1530
+ 48
1531
+ 49
1532
+ 50
1533
+ 51</pre>
1534
+ </td>
1535
+ <td>
1536
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/base64.rb', line 45</span>
1537
+
1538
+ <span class='kw'>def</span> <span class='id identifier rubyid_from_b64'>from_b64</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1539
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='symbol'>:strict</span>
1540
+ <span class='kw'>return</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_strict_decode64'>strict_decode64</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:strict</span> <span class='op'>||</span>
1541
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc4648</span>
1542
+ <span class='kw'>return</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_decode64'>decode64</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc2045</span>
1543
+ <span class='kw'>return</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_urlsafe_decode64'>urlsafe_decode64</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:urlsafe</span>
1544
+ <span class='kw'>end</span></pre>
1545
+ </td>
1546
+ </tr>
1547
+ </table>
1548
+ </div>
1549
+
1550
+ <div class="method_details ">
1551
+ <h3 class="signature " id="from_b64!-instance_method">
1552
+
1553
+ #<strong>from_b64!</strong>(opts = {}) &#x21d2; <tt>nil</tt>
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+ </h3><div class="docstring">
1560
+ <div class="discussion">
1561
+
1562
+ <p>Decode the string from base64 in place as described for <span class='object_link'><a href="#from_b64-instance_method" title="String#from_b64 (method)">#from_b64</a></span>.</p>
1563
+
1564
+
1565
+ </div>
1566
+ </div>
1567
+ <div class="tags">
1568
+
1569
+ <div class="examples">
1570
+ <p class="tag_title">Examples:</p>
1571
+
1572
+
1573
+ <pre class="example code"><code><span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>SGVsbG8gd29ybGQh</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;SGVsbG8gd29ybGQh&quot;
1574
+ </span><span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_from_b64!'>from_b64!</span> <span class='comment'># =&gt; nil
1575
+ </span><span class='id identifier rubyid_a'>a</span> <span class='comment'># =&gt; &quot;Hello world!&quot;</span></code></pre>
1576
+
1577
+ </div>
1578
+
1579
+ <p class="tag_title">Returns:</p>
1580
+ <ul class="return">
1581
+
1582
+ <li>
1583
+
1584
+
1585
+ <span class='type'>(<tt>nil</tt>)</span>
1586
+
1587
+
1588
+
1589
+ </li>
1590
+
1591
+ </ul>
1592
+
1593
+ </div><table class="source_code">
1594
+ <tr>
1595
+ <td>
1596
+ <pre class="lines">
1597
+
1598
+
1599
+ 59
1600
+ 60
1601
+ 61
1602
+ 62
1603
+ 63
1604
+ 64
1605
+ 65</pre>
1606
+ </td>
1607
+ <td>
1608
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/base64.rb', line 59</span>
1609
+
1610
+ <span class='kw'>def</span> <span class='id identifier rubyid_from_b64!'>from_b64!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1611
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='symbol'>:strict</span>
1612
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_from_b64'>from_b64</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:strict</span> <span class='op'>||</span>
1613
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc4648</span>
1614
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_from_b64'>from_b64</span><span class='lparen'>(</span><span class='label'>mode:</span> <span class='symbol'>:rfc2045</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc2045</span>
1615
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_from_b64'>from_b64</span><span class='lparen'>(</span><span class='label'>mode:</span> <span class='symbol'>:urlsafe</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:urlsafe</span>
1616
+ <span class='kw'>end</span></pre>
1617
+ </td>
1618
+ </tr>
1619
+ </table>
1620
+ </div>
1621
+
1622
+ <div class="method_details ">
1623
+ <h3 class="signature " id="md5-instance_method">
1624
+
1625
+ #<strong>md5</strong> &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+ </h3><div class="docstring">
1632
+ <div class="discussion">
1633
+
1634
+ <p>Calculate the md5 hash of the string.</p>
1635
+
1636
+
1637
+ </div>
1638
+ </div>
1639
+ <div class="tags">
1640
+
1641
+ <div class="examples">
1642
+ <p class="tag_title">Examples:</p>
1643
+
1644
+
1645
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>noraj</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_md5'>md5</span> <span class='comment'># =&gt; &quot;556cc23863fef20fab5c456db166bc6e&quot;</span></code></pre>
1646
+
1647
+ </div>
1648
+
1649
+ <p class="tag_title">Returns:</p>
1650
+ <ul class="return">
1651
+
1652
+ <li>
1653
+
1654
+
1655
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
1656
+
1657
+
1658
+
1659
+ &mdash;
1660
+ <div class='inline'>
1661
+ <p>md5 hash</p>
1662
+ </div>
1663
+
1664
+ </li>
1665
+
1666
+ </ul>
1667
+
1668
+ <p class="tag_title">See Also:</p>
1669
+ <ul class="see">
1670
+
1671
+ <li><a href="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/MD5.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/MD5.html">https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/MD5.html</a></li>
1672
+
1673
+ </ul>
1674
+
1675
+ </div><table class="source_code">
1676
+ <tr>
1677
+ <td>
1678
+ <pre class="lines">
1679
+
1680
+
1681
+ 12
1682
+ 13
1683
+ 14</pre>
1684
+ </td>
1685
+ <td>
1686
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 12</span>
1687
+
1688
+ <span class='kw'>def</span> <span class='id identifier rubyid_md5'>md5</span>
1689
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>MD5</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='kw'>self</span>
1690
+ <span class='kw'>end</span></pre>
1691
+ </td>
1692
+ </tr>
1693
+ </table>
1694
+ </div>
1695
+
1696
+ <div class="method_details ">
1697
+ <h3 class="signature " id="md5!-instance_method">
1698
+
1699
+ #<strong>md5!</strong> &#x21d2; <tt>Object</tt>
1700
+
1701
+
1702
+
1703
+
1704
+
1705
+ </h3><div class="docstring">
1706
+ <div class="discussion">
1707
+
1708
+ <p>Calculate the md5 hash of the string in place as described for <span class='object_link'><a href="#md5-instance_method" title="String#md5 (method)">#md5</a></span>.</p>
1709
+
1710
+
1711
+ </div>
1712
+ </div>
1713
+ <div class="tags">
1714
+
1715
+ <div class="examples">
1716
+ <p class="tag_title">Examples:</p>
1717
+
1718
+
1719
+ <pre class="example code"><code><span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\o/</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;\\o/&quot;
1720
+ </span><span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_md5!'>md5!</span> <span class='comment'># =&gt; &quot;881419964e480e66162da521ccc25ebf&quot;
1721
+ </span><span class='id identifier rubyid_a'>a</span> <span class='comment'># =&gt; &quot;881419964e480e66162da521ccc25ebf&quot;</span></code></pre>
1722
+
1723
+ </div>
1724
+
1725
+
1726
+ </div><table class="source_code">
1727
+ <tr>
1728
+ <td>
1729
+ <pre class="lines">
1730
+
1731
+
1732
+ 21
1733
+ 22
1734
+ 23</pre>
1735
+ </td>
1736
+ <td>
1737
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 21</span>
1738
+
1739
+ <span class='kw'>def</span> <span class='id identifier rubyid_md5!'>md5!</span>
1740
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_md5'>md5</span><span class='rparen'>)</span>
1741
+ <span class='kw'>end</span></pre>
1742
+ </td>
1743
+ </tr>
1744
+ </table>
1745
+ </div>
1746
+
1747
+ <div class="method_details ">
1748
+ <h3 class="signature " id="rmd160-instance_method">
1749
+
1750
+ #<strong>rmd160</strong> &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+ </h3><div class="docstring">
1757
+ <div class="discussion">
1758
+
1759
+ <p>Calculate the RIPEMD-160 hash of the string.</p>
1760
+
1761
+
1762
+ </div>
1763
+ </div>
1764
+ <div class="tags">
1765
+
1766
+ <div class="examples">
1767
+ <p class="tag_title">Examples:</p>
1768
+
1769
+
1770
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>payload</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_rmd160'>rmd160</span> <span class='comment'># =&gt; &quot;3c6255c112d409dafdb84d5b0edba98dfd27b44f&quot;</span></code></pre>
1771
+
1772
+ </div>
1773
+
1774
+ <p class="tag_title">Returns:</p>
1775
+ <ul class="return">
1776
+
1777
+ <li>
1778
+
1779
+
1780
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
1781
+
1782
+
1783
+
1784
+ &mdash;
1785
+ <div class='inline'>
1786
+ <p>RIPEMD-160 hash</p>
1787
+ </div>
1788
+
1789
+ </li>
1790
+
1791
+ </ul>
1792
+
1793
+ <p class="tag_title">See Also:</p>
1794
+ <ul class="see">
1795
+
1796
+ <li><a href="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/RMD160.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/RMD160.html">https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/RMD160.html</a></li>
1797
+
1798
+ </ul>
1799
+
1800
+ </div><table class="source_code">
1801
+ <tr>
1802
+ <td>
1803
+ <pre class="lines">
1804
+
1805
+
1806
+ 102
1807
+ 103
1808
+ 104</pre>
1809
+ </td>
1810
+ <td>
1811
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 102</span>
1812
+
1813
+ <span class='kw'>def</span> <span class='id identifier rubyid_rmd160'>rmd160</span>
1814
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>RMD160</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='kw'>self</span>
1815
+ <span class='kw'>end</span></pre>
1816
+ </td>
1817
+ </tr>
1818
+ </table>
1819
+ </div>
1820
+
1821
+ <div class="method_details ">
1822
+ <h3 class="signature " id="rmd160!-instance_method">
1823
+
1824
+ #<strong>rmd160!</strong> &#x21d2; <tt>Object</tt>
1825
+
1826
+
1827
+
1828
+
1829
+
1830
+ </h3><div class="docstring">
1831
+ <div class="discussion">
1832
+
1833
+ <p>Calculate the RIPEMD-160 hash of the string in place as described for <span class='object_link'><a href="#rmd160-instance_method" title="String#rmd160 (method)">#rmd160</a></span>.</p>
1834
+
1835
+
1836
+ </div>
1837
+ </div>
1838
+ <div class="tags">
1839
+
1840
+ <div class="examples">
1841
+ <p class="tag_title">Examples:</p>
1842
+
1843
+
1844
+ <pre class="example code"><code><span class='id identifier rubyid_pl'>pl</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>payload</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;payload&quot;
1845
+ </span><span class='id identifier rubyid_pl'>pl</span><span class='period'>.</span><span class='id identifier rubyid_rmd160!'>rmd160!</span> <span class='comment'># =&gt; &quot;3c6255c112d409dafdb84d5b0edba98dfd27b44f&quot;
1846
+ </span><span class='id identifier rubyid_pl'>pl</span> <span class='comment'># =&gt; &quot;3c6255c112d409dafdb84d5b0edba98dfd27b44f&quot;</span></code></pre>
1847
+
1848
+ </div>
1849
+
1850
+
1851
+ </div><table class="source_code">
1852
+ <tr>
1853
+ <td>
1854
+ <pre class="lines">
1855
+
1856
+
1857
+ 112
1858
+ 113
1859
+ 114</pre>
1860
+ </td>
1861
+ <td>
1862
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 112</span>
1863
+
1864
+ <span class='kw'>def</span> <span class='id identifier rubyid_rmd160!'>rmd160!</span>
1865
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_rmd160'>rmd160</span><span class='rparen'>)</span>
1866
+ <span class='kw'>end</span></pre>
1867
+ </td>
1868
+ </tr>
1869
+ </table>
1870
+ </div>
1871
+
1872
+ <div class="method_details ">
1873
+ <h3 class="signature " id="rot-instance_method">
1874
+
1875
+ #<strong>rot</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+ </h3><div class="docstring">
1882
+ <div class="discussion">
1883
+
1884
+ <p>“Encrypt / Decrypt” the string with Caesar cipher. This will shift the alphabet letters by <code>n</code>, where <code>n</code> is the integer key. The same function is used for encryption / decryption.</p>
1885
+
1886
+
1887
+ </div>
1888
+ </div>
1889
+ <div class="tags">
1890
+
1891
+ <div class="examples">
1892
+ <p class="tag_title">Examples:</p>
1893
+
1894
+
1895
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Hello world!</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_rot'>rot</span> <span class='comment'># =&gt; &quot;Uryyb jbeyq!&quot;
1896
+ </span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Hello world!</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_rot'>rot</span><span class='lparen'>(</span><span class='label'>shift:</span> <span class='int'>11</span><span class='rparen'>)</span> <span class='comment'># =&gt; &quot;Spwwz hzcwo!&quot;
1897
+ </span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Uryyb jbeyq!</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_rot'>rot</span> <span class='comment'># =&gt; &quot;Hello world!&quot;
1898
+ </span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Spwwz hzcwo!</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_rot'>rot</span><span class='lparen'>(</span><span class='label'>shift:</span> <span class='int'>26</span><span class='op'>-</span><span class='int'>11</span><span class='rparen'>)</span> <span class='comment'># =&gt; &quot;Hello world!&quot;</span></code></pre>
1899
+
1900
+ </div>
1901
+ <p class="tag_title">Parameters:</p>
1902
+ <ul class="param">
1903
+
1904
+ <li>
1905
+
1906
+ <span class='name'>opts</span>
1907
+
1908
+
1909
+ <span class='type'>(<tt>Hash</tt>)</span>
1910
+
1911
+
1912
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1913
+
1914
+
1915
+ &mdash;
1916
+ <div class='inline'>
1917
+ <p>optional parameters</p>
1918
+ </div>
1919
+
1920
+ </li>
1921
+
1922
+ </ul>
1923
+
1924
+
1925
+
1926
+
1927
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
1928
+ <ul class="option">
1929
+
1930
+ <li>
1931
+ <span class="name">:shift</span>
1932
+ <span class="type">(<tt>Integer</tt>)</span>
1933
+ <span class="default">
1934
+
1935
+ </span>
1936
+
1937
+ &mdash; <div class='inline'>
1938
+ <p>The shift key. Default value: 13.</p>
1939
+ </div>
1940
+
1941
+ </li>
1942
+
1943
+ </ul>
1944
+
1945
+
1946
+ <p class="tag_title">Returns:</p>
1947
+ <ul class="return">
1948
+
1949
+ <li>
1950
+
1951
+
1952
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
1953
+
1954
+
1955
+
1956
+ &mdash;
1957
+ <div class='inline'>
1958
+ <p>the (de)ciphered string</p>
1959
+ </div>
1960
+
1961
+ </li>
1962
+
1963
+ </ul>
1964
+
1965
+ <p class="tag_title">See Also:</p>
1966
+ <ul class="see">
1967
+
1968
+ <li><a href="https://en.wikipedia.org/wiki/Caesar_cipher" target="_parent" title="https://en.wikipedia.org/wiki/Caesar_cipher">https://en.wikipedia.org/wiki/Caesar_cipher</a></li>
1969
+
1970
+ </ul>
1971
+
1972
+ </div><table class="source_code">
1973
+ <tr>
1974
+ <td>
1975
+ <pre class="lines">
1976
+
1977
+
1978
+ 16
1979
+ 17
1980
+ 18
1981
+ 19
1982
+ 20
1983
+ 21
1984
+ 22
1985
+ 23
1986
+ 24</pre>
1987
+ </td>
1988
+ <td>
1989
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/rot.rb', line 16</span>
1990
+
1991
+ <span class='kw'>def</span> <span class='id identifier rubyid_rot'>rot</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1992
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:shift</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='int'>13</span>
1993
+ <span class='id identifier rubyid_alphabet'>alphabet</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>a</span><span class='tstring_end'>&#39;</span></span><span class='op'>..</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>z</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1994
+ <span class='id identifier rubyid_lowercase'>lowercase</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_alphabet'>alphabet</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='id identifier rubyid_alphabet'>alphabet</span><span class='period'>.</span><span class='id identifier rubyid_rotate'>rotate</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:shift</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rbracket'>]</span>
1995
+ <span class='id identifier rubyid_alphabet'>alphabet</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>A</span><span class='tstring_end'>&#39;</span></span><span class='op'>..</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Z</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1996
+ <span class='id identifier rubyid_uppercasecase'>uppercasecase</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_alphabet'>alphabet</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='id identifier rubyid_alphabet'>alphabet</span><span class='period'>.</span><span class='id identifier rubyid_rotate'>rotate</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:shift</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rbracket'>]</span>
1997
+ <span class='id identifier rubyid_encrypter'>encrypter</span> <span class='op'>=</span> <span class='id identifier rubyid_lowercase'>lowercase</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_uppercasecase'>uppercasecase</span><span class='rparen'>)</span>
1998
+ <span class='id identifier rubyid_chars'>chars</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_encrypter'>encrypter</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='comma'>,</span> <span class='id identifier rubyid_c'>c</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
1999
+ <span class='kw'>end</span></pre>
2000
+ </td>
2001
+ </tr>
2002
+ </table>
2003
+ </div>
2004
+
2005
+ <div class="method_details ">
2006
+ <h3 class="signature " id="rot!-instance_method">
2007
+
2008
+ #<strong>rot!</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
2009
+
2010
+
2011
+
2012
+
2013
+
2014
+ </h3><div class="docstring">
2015
+ <div class="discussion">
2016
+
2017
+ <p>“Encrypt / Decrypt” the string with Caesar cipher in place as described for <span class='object_link'><a href="#rot-instance_method" title="String#rot (method)">#rot</a></span>.</p>
2018
+
2019
+
2020
+ </div>
2021
+ </div>
2022
+ <div class="tags">
2023
+
2024
+ <div class="examples">
2025
+ <p class="tag_title">Examples:</p>
2026
+
2027
+
2028
+ <pre class="example code"><code><span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Bonjour le monde !</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;Bonjour le monde !&quot;
2029
+ </span><span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_rot!'>rot!</span> <span class='comment'># =&gt; &quot;Obawbhe yr zbaqr !&quot;
2030
+ </span><span class='id identifier rubyid_a'>a</span> <span class='comment'># =&gt; &quot;Obawbhe yr zbaqr !&quot;</span></code></pre>
2031
+
2032
+ </div>
2033
+
2034
+ <p class="tag_title">Returns:</p>
2035
+ <ul class="return">
2036
+
2037
+ <li>
2038
+
2039
+
2040
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
2041
+
2042
+
2043
+
2044
+ &mdash;
2045
+ <div class='inline'>
2046
+ <p>the (de)ciphered string as well as changing changing the object in place.</p>
2047
+ </div>
2048
+
2049
+ </li>
2050
+
2051
+ </ul>
2052
+
2053
+ </div><table class="source_code">
2054
+ <tr>
2055
+ <td>
2056
+ <pre class="lines">
2057
+
2058
+
2059
+ 34
2060
+ 35
2061
+ 36</pre>
2062
+ </td>
2063
+ <td>
2064
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/rot.rb', line 34</span>
2065
+
2066
+ <span class='kw'>def</span> <span class='id identifier rubyid_rot!'>rot!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2067
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_rot'>rot</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='rparen'>)</span>
2068
+ <span class='kw'>end</span></pre>
2069
+ </td>
2070
+ </tr>
2071
+ </table>
2072
+ </div>
2073
+
2074
+ <div class="method_details ">
2075
+ <h3 class="signature " id="rot13-instance_method">
2076
+
2077
+ #<strong>rot13</strong> &#x21d2; <tt>Object</tt>
2078
+
2079
+
2080
+
2081
+
2082
+
2083
+ </h3><div class="docstring">
2084
+ <div class="discussion">
2085
+
2086
+ <p>Alias for <span class='object_link'><a href="#rot-instance_method" title="String#rot (method)">#rot</a></span> with default value ( <tt>rot(shift: 13)</tt> ).</p>
2087
+
2088
+
2089
+ </div>
2090
+ </div>
2091
+ <div class="tags">
2092
+
2093
+
2094
+ </div><table class="source_code">
2095
+ <tr>
2096
+ <td>
2097
+ <pre class="lines">
2098
+
2099
+
2100
+ 39
2101
+ 40
2102
+ 41</pre>
2103
+ </td>
2104
+ <td>
2105
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/rot.rb', line 39</span>
2106
+
2107
+ <span class='kw'>def</span> <span class='id identifier rubyid_rot13'>rot13</span>
2108
+ <span class='id identifier rubyid_rot'>rot</span>
2109
+ <span class='kw'>end</span></pre>
2110
+ </td>
2111
+ </tr>
2112
+ </table>
2113
+ </div>
2114
+
2115
+ <div class="method_details ">
2116
+ <h3 class="signature " id="rot13!-instance_method">
2117
+
2118
+ #<strong>rot13!</strong> &#x21d2; <tt>Object</tt>
2119
+
2120
+
2121
+
2122
+
2123
+
2124
+ </h3><div class="docstring">
2125
+ <div class="discussion">
2126
+
2127
+ <p>Alias for <span class='object_link'><a href="#rot!-instance_method" title="String#rot! (method)">#rot!</a></span> with default value ( <tt>rot!(shift: 13)</tt> ).</p>
2128
+
2129
+
2130
+ </div>
2131
+ </div>
2132
+ <div class="tags">
2133
+
2134
+
2135
+ </div><table class="source_code">
2136
+ <tr>
2137
+ <td>
2138
+ <pre class="lines">
2139
+
2140
+
2141
+ 44
2142
+ 45
2143
+ 46</pre>
2144
+ </td>
2145
+ <td>
2146
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/rot.rb', line 44</span>
2147
+
2148
+ <span class='kw'>def</span> <span class='id identifier rubyid_rot13!'>rot13!</span>
2149
+ <span class='id identifier rubyid_rot!'>rot!</span>
2150
+ <span class='kw'>end</span></pre>
2151
+ </td>
2152
+ </tr>
2153
+ </table>
2154
+ </div>
2155
+
2156
+ <div class="method_details ">
2157
+ <h3 class="signature " id="sha1-instance_method">
2158
+
2159
+ #<strong>sha1</strong> &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
2160
+
2161
+
2162
+
2163
+
2164
+
2165
+ </h3><div class="docstring">
2166
+ <div class="discussion">
2167
+
2168
+ <p>Calculate the sha1 hash of the string.</p>
2169
+
2170
+
2171
+ </div>
2172
+ </div>
2173
+ <div class="tags">
2174
+
2175
+ <div class="examples">
2176
+ <p class="tag_title">Examples:</p>
2177
+
2178
+
2179
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ctf-party</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_sha1'>sha1</span> <span class='comment'># =&gt; &quot;5a64f3bc491d0977e1e3578a48c65a89a16a5fe8&quot;</span></code></pre>
2180
+
2181
+ </div>
2182
+
2183
+ <p class="tag_title">Returns:</p>
2184
+ <ul class="return">
2185
+
2186
+ <li>
2187
+
2188
+
2189
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
2190
+
2191
+
2192
+
2193
+ &mdash;
2194
+ <div class='inline'>
2195
+ <p>sha1 hash</p>
2196
+ </div>
2197
+
2198
+ </li>
2199
+
2200
+ </ul>
2201
+
2202
+ <p class="tag_title">See Also:</p>
2203
+ <ul class="see">
2204
+
2205
+ <li><a href="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/SHA1.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/SHA1.html">https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/SHA1.html</a></li>
2206
+
2207
+ </ul>
2208
+
2209
+ </div><table class="source_code">
2210
+ <tr>
2211
+ <td>
2212
+ <pre class="lines">
2213
+
2214
+
2215
+ 30
2216
+ 31
2217
+ 32</pre>
2218
+ </td>
2219
+ <td>
2220
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 30</span>
2221
+
2222
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha1'>sha1</span>
2223
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='kw'>self</span>
2224
+ <span class='kw'>end</span></pre>
2225
+ </td>
2226
+ </tr>
2227
+ </table>
2228
+ </div>
2229
+
2230
+ <div class="method_details ">
2231
+ <h3 class="signature " id="sha1!-instance_method">
2232
+
2233
+ #<strong>sha1!</strong> &#x21d2; <tt>Object</tt>
2234
+
2235
+
2236
+
2237
+
2238
+
2239
+ </h3><div class="docstring">
2240
+ <div class="discussion">
2241
+
2242
+ <p>Calculate the sha1 hash of the string in place as described for <span class='object_link'><a href="#sha1-instance_method" title="String#sha1 (method)">#sha1</a></span>.</p>
2243
+
2244
+
2245
+ </div>
2246
+ </div>
2247
+ <div class="tags">
2248
+
2249
+ <div class="examples">
2250
+ <p class="tag_title">Examples:</p>
2251
+
2252
+
2253
+ <pre class="example code"><code><span class='id identifier rubyid_bob'>bob</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>alice</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;alice&quot;
2254
+ </span><span class='id identifier rubyid_bob'>bob</span><span class='period'>.</span><span class='id identifier rubyid_sha1!'>sha1!</span> <span class='comment'># =&gt; &quot;522b276a356bdf39013dfabea2cd43e141ecc9e8&quot;
2255
+ </span><span class='id identifier rubyid_bob'>bob</span> <span class='comment'># =&gt; &quot;522b276a356bdf39013dfabea2cd43e141ecc9e8&quot;</span></code></pre>
2256
+
2257
+ </div>
2258
+
2259
+
2260
+ </div><table class="source_code">
2261
+ <tr>
2262
+ <td>
2263
+ <pre class="lines">
2264
+
2265
+
2266
+ 39
2267
+ 40
2268
+ 41</pre>
2269
+ </td>
2270
+ <td>
2271
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 39</span>
2272
+
2273
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha1!'>sha1!</span>
2274
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_sha1'>sha1</span><span class='rparen'>)</span>
2275
+ <span class='kw'>end</span></pre>
2276
+ </td>
2277
+ </tr>
2278
+ </table>
2279
+ </div>
2280
+
2281
+ <div class="method_details ">
2282
+ <h3 class="signature " id="sha2-instance_method">
2283
+
2284
+ #<strong>sha2</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
2285
+
2286
+
2287
+
2288
+
2289
+
2290
+ </h3><div class="docstring">
2291
+ <div class="discussion">
2292
+
2293
+ <p>Calculate the sha2 hash of the string.</p>
2294
+
2295
+
2296
+ </div>
2297
+ </div>
2298
+ <div class="tags">
2299
+
2300
+ <div class="examples">
2301
+ <p class="tag_title">Examples:</p>
2302
+
2303
+
2304
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>try harder</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_sha2'>sha2</span> <span class='comment'># =&gt; &quot;5321ff2d4b1389b3a350dfe8ca77e3889dc6259bb233ad...&quot;
2305
+ </span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>try harder</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='label'>bitlen:</span> <span class='int'>512</span><span class='rparen'>)</span> <span class='comment'># =&gt; &quot;a7b73a98c095b22e25407b15c4dec128c...&quot;</span></code></pre>
2306
+
2307
+ </div>
2308
+ <p class="tag_title">Parameters:</p>
2309
+ <ul class="param">
2310
+
2311
+ <li>
2312
+
2313
+ <span class='name'>opts</span>
2314
+
2315
+
2316
+ <span class='type'>(<tt>Hash</tt>)</span>
2317
+
2318
+
2319
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2320
+
2321
+
2322
+ &mdash;
2323
+ <div class='inline'>
2324
+ <p>optional parameters</p>
2325
+ </div>
2326
+
2327
+ </li>
2328
+
2329
+ </ul>
2330
+
2331
+
2332
+
2333
+
2334
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
2335
+ <ul class="option">
2336
+
2337
+ <li>
2338
+ <span class="name">:bitlen</span>
2339
+ <span class="type">(<tt>Integer</tt>)</span>
2340
+ <span class="default">
2341
+
2342
+ </span>
2343
+
2344
+ &mdash; <div class='inline'>
2345
+ <p>Defines the bit lenght of the digest. Default value: 256 (SHA2-256). other valid vales are 384 (SHA2-384) and 512 (SHA2-512).</p>
2346
+ </div>
2347
+
2348
+ </li>
2349
+
2350
+ </ul>
2351
+
2352
+
2353
+ <p class="tag_title">Returns:</p>
2354
+ <ul class="return">
2355
+
2356
+ <li>
2357
+
2358
+
2359
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
2360
+
2361
+
2362
+
2363
+ &mdash;
2364
+ <div class='inline'>
2365
+ <p>sha hash</p>
2366
+ </div>
2367
+
2368
+ </li>
2369
+
2370
+ </ul>
2371
+
2372
+ <p class="tag_title">See Also:</p>
2373
+ <ul class="see">
2374
+
2375
+ <li><a href="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/SHA2.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/SHA2.html">https://ruby-doc.org/stdlib-2.6.1/libdoc/digest/rdoc/Digest/SHA2.html</a></li>
2376
+
2377
+ </ul>
2378
+
2379
+ </div><table class="source_code">
2380
+ <tr>
2381
+ <td>
2382
+ <pre class="lines">
2383
+
2384
+
2385
+ 53
2386
+ 54
2387
+ 55
2388
+ 56</pre>
2389
+ </td>
2390
+ <td>
2391
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 53</span>
2392
+
2393
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2394
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:bitlen</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='int'>256</span>
2395
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA2</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:bitlen</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='kw'>self</span>
2396
+ <span class='kw'>end</span></pre>
2397
+ </td>
2398
+ </tr>
2399
+ </table>
2400
+ </div>
2401
+
2402
+ <div class="method_details ">
2403
+ <h3 class="signature " id="sha2!-instance_method">
2404
+
2405
+ #<strong>sha2!</strong>(opts = {}) &#x21d2; <tt>Object</tt>
2406
+
2407
+
2408
+
2409
+
2410
+
2411
+ </h3><div class="docstring">
2412
+ <div class="discussion">
2413
+
2414
+ <p>Calculate the sha2 hash of the string in place as described for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span>.</p>
2415
+
2416
+
2417
+ </div>
2418
+ </div>
2419
+ <div class="tags">
2420
+
2421
+ <div class="examples">
2422
+ <p class="tag_title">Examples:</p>
2423
+
2424
+
2425
+ <pre class="example code"><code><span class='id identifier rubyid_th'>th</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>try harder</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;try harder&quot;
2426
+ </span><span class='id identifier rubyid_th'>th</span><span class='period'>.</span><span class='id identifier rubyid_sha2!'>sha2!</span><span class='lparen'>(</span><span class='label'>bitlen:</span> <span class='int'>384</span><span class='rparen'>)</span> <span class='comment'># =&gt; &quot;bb7f60b9562a19c3a83c23791440af11591c42ede9...&quot;
2427
+ </span><span class='id identifier rubyid_th'>th</span> <span class='comment'># =&gt; &quot;bb7f60b9562a19c3a83c23791440af11591c42ede9988334cdfd7efa4261a...&quot;</span></code></pre>
2428
+
2429
+ </div>
2430
+
2431
+
2432
+ </div><table class="source_code">
2433
+ <tr>
2434
+ <td>
2435
+ <pre class="lines">
2436
+
2437
+
2438
+ 63
2439
+ 64
2440
+ 65</pre>
2441
+ </td>
2442
+ <td>
2443
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 63</span>
2444
+
2445
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2!'>sha2!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2446
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='rparen'>)</span>
2447
+ <span class='kw'>end</span></pre>
2448
+ </td>
2449
+ </tr>
2450
+ </table>
2451
+ </div>
2452
+
2453
+ <div class="method_details ">
2454
+ <h3 class="signature " id="sha2_256-instance_method">
2455
+
2456
+ #<strong>sha2_256</strong> &#x21d2; <tt>Object</tt>
2457
+
2458
+
2459
+
2460
+
2461
+
2462
+ </h3><div class="docstring">
2463
+ <div class="discussion">
2464
+
2465
+ <p>Alias for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span> with default value ( <tt>sha2(bitlen: 256)</tt> ).</p>
2466
+
2467
+
2468
+ </div>
2469
+ </div>
2470
+ <div class="tags">
2471
+
2472
+
2473
+ </div><table class="source_code">
2474
+ <tr>
2475
+ <td>
2476
+ <pre class="lines">
2477
+
2478
+
2479
+ 68
2480
+ 69
2481
+ 70</pre>
2482
+ </td>
2483
+ <td>
2484
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 68</span>
2485
+
2486
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2_256'>sha2_256</span>
2487
+ <span class='id identifier rubyid_sha2'>sha2</span>
2488
+ <span class='kw'>end</span></pre>
2489
+ </td>
2490
+ </tr>
2491
+ </table>
2492
+ </div>
2493
+
2494
+ <div class="method_details ">
2495
+ <h3 class="signature " id="sha2_256!-instance_method">
2496
+
2497
+ #<strong>sha2_256!</strong> &#x21d2; <tt>Object</tt>
2498
+
2499
+
2500
+
2501
+
2502
+
2503
+ </h3><div class="docstring">
2504
+ <div class="discussion">
2505
+
2506
+ <p>Alias for <span class='object_link'><a href="#sha2!-instance_method" title="String#sha2! (method)">#sha2!</a></span> with default value ( <tt>sha2!(bitlen: 256)</tt> ).</p>
2507
+
2508
+
2509
+ </div>
2510
+ </div>
2511
+ <div class="tags">
2512
+
2513
+
2514
+ </div><table class="source_code">
2515
+ <tr>
2516
+ <td>
2517
+ <pre class="lines">
2518
+
2519
+
2520
+ 73
2521
+ 74
2522
+ 75</pre>
2523
+ </td>
2524
+ <td>
2525
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 73</span>
2526
+
2527
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2_256!'>sha2_256!</span>
2528
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_sha2'>sha2</span><span class='rparen'>)</span>
2529
+ <span class='kw'>end</span></pre>
2530
+ </td>
2531
+ </tr>
2532
+ </table>
2533
+ </div>
2534
+
2535
+ <div class="method_details ">
2536
+ <h3 class="signature " id="sha2_384-instance_method">
2537
+
2538
+ #<strong>sha2_384</strong> &#x21d2; <tt>Object</tt>
2539
+
2540
+
2541
+
2542
+
2543
+
2544
+ </h3><div class="docstring">
2545
+ <div class="discussion">
2546
+
2547
+ <p>Alias for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span> with default value ( <tt>sha2(bitlen: 384)</tt> ).</p>
2548
+
2549
+
2550
+ </div>
2551
+ </div>
2552
+ <div class="tags">
2553
+
2554
+
2555
+ </div><table class="source_code">
2556
+ <tr>
2557
+ <td>
2558
+ <pre class="lines">
2559
+
2560
+
2561
+ 78
2562
+ 79
2563
+ 80</pre>
2564
+ </td>
2565
+ <td>
2566
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 78</span>
2567
+
2568
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2_384'>sha2_384</span>
2569
+ <span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='label'>bitlen:</span> <span class='int'>384</span><span class='rparen'>)</span>
2570
+ <span class='kw'>end</span></pre>
2571
+ </td>
2572
+ </tr>
2573
+ </table>
2574
+ </div>
2575
+
2576
+ <div class="method_details ">
2577
+ <h3 class="signature " id="sha2_384!-instance_method">
2578
+
2579
+ #<strong>sha2_384!</strong> &#x21d2; <tt>Object</tt>
2580
+
2581
+
2582
+
2583
+
2584
+
2585
+ </h3><div class="docstring">
2586
+ <div class="discussion">
2587
+
2588
+ <p>Alias for <span class='object_link'><a href="#sha2!-instance_method" title="String#sha2! (method)">#sha2!</a></span> with default value ( <tt>sha2!(bitlen: 384)</tt> ).</p>
2589
+
2590
+
2591
+ </div>
2592
+ </div>
2593
+ <div class="tags">
2594
+
2595
+
2596
+ </div><table class="source_code">
2597
+ <tr>
2598
+ <td>
2599
+ <pre class="lines">
2600
+
2601
+
2602
+ 83
2603
+ 84
2604
+ 85</pre>
2605
+ </td>
2606
+ <td>
2607
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 83</span>
2608
+
2609
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2_384!'>sha2_384!</span>
2610
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='label'>bitlen:</span> <span class='int'>384</span><span class='rparen'>)</span><span class='rparen'>)</span>
2611
+ <span class='kw'>end</span></pre>
2612
+ </td>
2613
+ </tr>
2614
+ </table>
2615
+ </div>
2616
+
2617
+ <div class="method_details ">
2618
+ <h3 class="signature " id="sha2_512-instance_method">
2619
+
2620
+ #<strong>sha2_512</strong> &#x21d2; <tt>Object</tt>
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+ </h3><div class="docstring">
2627
+ <div class="discussion">
2628
+
2629
+ <p>Alias for <span class='object_link'><a href="#sha2-instance_method" title="String#sha2 (method)">#sha2</a></span> with default value ( <tt>sha2(bitlen: 512)</tt> ).</p>
2630
+
2631
+
2632
+ </div>
2633
+ </div>
2634
+ <div class="tags">
2635
+
2636
+
2637
+ </div><table class="source_code">
2638
+ <tr>
2639
+ <td>
2640
+ <pre class="lines">
2641
+
2642
+
2643
+ 88
2644
+ 89
2645
+ 90</pre>
2646
+ </td>
2647
+ <td>
2648
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 88</span>
2649
+
2650
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2_512'>sha2_512</span>
2651
+ <span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='label'>bitlen:</span> <span class='int'>512</span><span class='rparen'>)</span>
2652
+ <span class='kw'>end</span></pre>
2653
+ </td>
2654
+ </tr>
2655
+ </table>
2656
+ </div>
2657
+
2658
+ <div class="method_details ">
2659
+ <h3 class="signature " id="sha2_512!-instance_method">
2660
+
2661
+ #<strong>sha2_512!</strong> &#x21d2; <tt>Object</tt>
2662
+
2663
+
2664
+
2665
+
2666
+
2667
+ </h3><div class="docstring">
2668
+ <div class="discussion">
2669
+
2670
+ <p>Alias for <span class='object_link'><a href="#sha2!-instance_method" title="String#sha2! (method)">#sha2!</a></span> with default value ( <tt>sha2!(bitlen: 512)</tt> ).</p>
2671
+
2672
+
2673
+ </div>
2674
+ </div>
2675
+ <div class="tags">
2676
+
2677
+
2678
+ </div><table class="source_code">
2679
+ <tr>
2680
+ <td>
2681
+ <pre class="lines">
2682
+
2683
+
2684
+ 93
2685
+ 94
2686
+ 95</pre>
2687
+ </td>
2688
+ <td>
2689
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/digest.rb', line 93</span>
2690
+
2691
+ <span class='kw'>def</span> <span class='id identifier rubyid_sha2_512!'>sha2_512!</span>
2692
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_sha2'>sha2</span><span class='lparen'>(</span><span class='label'>bitlen:</span> <span class='int'>512</span><span class='rparen'>)</span><span class='rparen'>)</span>
2693
+ <span class='kw'>end</span></pre>
2694
+ </td>
2695
+ </tr>
2696
+ </table>
2697
+ </div>
2698
+
2699
+ <div class="method_details ">
2700
+ <h3 class="signature " id="to_b64-instance_method">
2701
+
2702
+ #<strong>to_b64</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+ </h3><div class="docstring">
2709
+ <div class="discussion">
2710
+
2711
+ <p>Encode the string into base64</p>
2712
+
2713
+
2714
+ </div>
2715
+ </div>
2716
+ <div class="tags">
2717
+
2718
+ <div class="examples">
2719
+ <p class="tag_title">Examples:</p>
2720
+
2721
+
2722
+ <pre class="example code"><code><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Super lib!</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_to_b64'>to_b64</span> <span class='comment'># =&gt; &quot;U3VwZXIgbGliIQ==&quot;</span></code></pre>
2723
+
2724
+ </div>
2725
+ <p class="tag_title">Parameters:</p>
2726
+ <ul class="param">
2727
+
2728
+ <li>
2729
+
2730
+ <span class='name'>opts</span>
2731
+
2732
+
2733
+ <span class='type'>(<tt>Hash</tt>)</span>
2734
+
2735
+
2736
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2737
+
2738
+
2739
+ &mdash;
2740
+ <div class='inline'>
2741
+ <p>optional parameters</p>
2742
+ </div>
2743
+
2744
+ </li>
2745
+
2746
+ </ul>
2747
+
2748
+
2749
+
2750
+
2751
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
2752
+ <ul class="option">
2753
+
2754
+ <li>
2755
+ <span class="name">:mode</span>
2756
+ <span class="type">(<tt>Symbol</tt>)</span>
2757
+ <span class="default">
2758
+
2759
+ </span>
2760
+
2761
+ &mdash; <div class='inline'>
2762
+ <p>Default value: <code>:strict</code>. Other values are <code>:strict</code> (<code>:rfc4648</code>) or <code>:urlsafe</code>.</p>
2763
+ </div>
2764
+
2765
+ </li>
2766
+
2767
+ </ul>
2768
+
2769
+
2770
+ <p class="tag_title">Returns:</p>
2771
+ <ul class="return">
2772
+
2773
+ <li>
2774
+
2775
+
2776
+ <span class='type'>(<tt><span class='object_link'><a href="" title="String (class)">String</a></span></tt>)</span>
2777
+
2778
+
2779
+
2780
+ &mdash;
2781
+ <div class='inline'>
2782
+ <p>the Base64 encoded string</p>
2783
+ </div>
2784
+
2785
+ </li>
2786
+
2787
+ </ul>
2788
+
2789
+ <p class="tag_title">See Also:</p>
2790
+ <ul class="see">
2791
+
2792
+ <li><a href="https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html" target="_parent" title="https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html">https://ruby-doc.org/stdlib-2.6.5/libdoc/base64/rdoc/Base64.html</a></li>
2793
+
2794
+ </ul>
2795
+
2796
+ </div><table class="source_code">
2797
+ <tr>
2798
+ <td>
2799
+ <pre class="lines">
2800
+
2801
+
2802
+ 15
2803
+ 16
2804
+ 17
2805
+ 18
2806
+ 19
2807
+ 20
2808
+ 21</pre>
2809
+ </td>
2810
+ <td>
2811
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/base64.rb', line 15</span>
2812
+
2813
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_b64'>to_b64</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2814
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='symbol'>:strict</span>
2815
+ <span class='kw'>return</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_strict_encode64'>strict_encode64</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:strict</span> <span class='op'>||</span>
2816
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc4648</span>
2817
+ <span class='kw'>return</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_encode64'>encode64</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc2045</span>
2818
+ <span class='kw'>return</span> <span class='const'>Base64</span><span class='period'>.</span><span class='id identifier rubyid_urlsafe_encode64'>urlsafe_encode64</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:urlsafe</span>
2819
+ <span class='kw'>end</span></pre>
2820
+ </td>
2821
+ </tr>
2822
+ </table>
2823
+ </div>
2824
+
2825
+ <div class="method_details ">
2826
+ <h3 class="signature " id="to_b64!-instance_method">
2827
+
2828
+ #<strong>to_b64!</strong>(opts = {}) &#x21d2; <tt>nil</tt>
2829
+
2830
+
2831
+
2832
+
2833
+
2834
+ </h3><div class="docstring">
2835
+ <div class="discussion">
2836
+
2837
+ <p>Encode the string into base64 in place as described for <span class='object_link'><a href="#to_b64-instance_method" title="String#to_b64 (method)">#to_b64</a></span>.</p>
2838
+
2839
+
2840
+ </div>
2841
+ </div>
2842
+ <div class="tags">
2843
+
2844
+ <div class="examples">
2845
+ <p class="tag_title">Examples:</p>
2846
+
2847
+
2848
+ <pre class="example code"><code><span class='id identifier rubyid_myStr'>myStr</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Ruby</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># =&gt; &quot;Ruby&quot;
2849
+ </span><span class='id identifier rubyid_myStr'>myStr</span><span class='period'>.</span><span class='id identifier rubyid_to_b64!'>to_b64!</span> <span class='comment'># =&gt; nil
2850
+ </span><span class='id identifier rubyid_myStr'>myStr</span> <span class='comment'># =&gt; &quot;UnVieQ==&quot;</span></code></pre>
2851
+
2852
+ </div>
2853
+
2854
+ <p class="tag_title">Returns:</p>
2855
+ <ul class="return">
2856
+
2857
+ <li>
2858
+
2859
+
2860
+ <span class='type'>(<tt>nil</tt>)</span>
2861
+
2862
+
2863
+
2864
+ </li>
2865
+
2866
+ </ul>
2867
+
2868
+ </div><table class="source_code">
2869
+ <tr>
2870
+ <td>
2871
+ <pre class="lines">
2872
+
2873
+
2874
+ 29
2875
+ 30
2876
+ 31
2877
+ 32
2878
+ 33
2879
+ 34
2880
+ 35</pre>
2881
+ </td>
2882
+ <td>
2883
+ <pre class="code"><span class="info file"># File 'lib/ctf_party/base64.rb', line 29</span>
2884
+
2885
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_b64!'>to_b64!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2886
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='symbol'>:strict</span>
2887
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_to_b64'>to_b64</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:strict</span> <span class='op'>||</span>
2888
+ <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc4648</span>
2889
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_to_b64'>to_b64</span><span class='lparen'>(</span><span class='label'>mode:</span> <span class='symbol'>:rfc2045</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:rfc2045</span>
2890
+ <span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_to_b64'>to_b64</span><span class='lparen'>(</span><span class='label'>mode:</span> <span class='symbol'>:urlsafe</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:mode</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:urlsafe</span>
2891
+ <span class='kw'>end</span></pre>
2892
+ </td>
2893
+ </tr>
2894
+ </table>
2895
+ </div>
2896
+
2897
+ </div>
2898
+
2899
+ </div>
2900
+
2901
+ <div id="footer">
2902
+ Generated on Wed Nov 20 19:33:26 2019 by
2903
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2904
+ 0.9.20 (ruby-2.6.2).
2905
+ </div>
2906
+
2907
+ </div>
2908
+ </body>
2909
+ </html>