MCPcopy Create free account
hub / github.com/cryptii/cryptii / constructor

Method constructor

src/Encoder/RailFenceCipher.js:25–47  ·  view source on GitHub ↗

* Constructor

()

Source from the content-addressed store, hash-verified

23 * Constructor
24 */
25 constructor () {
26 super()
27 this.addSettings([
28 {
29 name: 'key',
30 type: 'number',
31 value: 2,
32 integer: true,
33 min: 2,
34 max: 99,
35 // Pick a random key between 2 and 8
36 randomizeValue: random => random.nextInteger(2, 8)
37 },
38 {
39 name: 'offset',
40 type: 'number',
41 value: 0,
42 integer: true,
43 min: 0,
44 randomizable: false
45 }
46 ])
47 }
48
49 /**
50 * Performs encode on given content.

Callers

nothing calls this directly

Calls 2

addSettingsMethod · 0.80
nextIntegerMethod · 0.80

Tested by

no test coverage detected