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

Method constructor

src/Encoder/TapCode.js:33–75  ·  view source on GitHub ↗

* Constructor

()

Source from the content-addressed store, hash-verified

31 * Constructor
32 */
33 constructor () {
34 super()
35 this.addSettings([
36 {
37 name: 'tapMark',
38 label: 'Tap',
39 type: 'text',
40 width: 4,
41 value: '.',
42 minLength: 1,
43 randomizable: false
44 },
45 {
46 name: 'groupMark',
47 label: 'Group',
48 type: 'text',
49 width: 4,
50 value: ' ',
51 minLength: 1,
52 randomizable: false
53 },
54 {
55 name: 'letterMark',
56 label: 'Letter',
57 type: 'text',
58 width: 4,
59 value: ' ',
60 minLength: 1,
61 randomizable: false
62 }
63 ])
64
65 // Create internal Polybius square encoder instance
66 this._polybiusSquare = new PolybiusSquareEncoder()
67 this._polybiusSquare.setSettingValues({
68 alphabet,
69 rows: '12345',
70 columns: '12345',
71 separator: '',
72 caseSensitivity: false,
73 includeForeignChars: false
74 })
75 }
76
77 /**
78 * Performs encode on given content.

Callers

nothing calls this directly

Calls 2

addSettingsMethod · 0.80
setSettingValuesMethod · 0.80

Tested by

no test coverage detected