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

Method constructor

src/Encoder/NihilistCipher.js:41–82  ·  view source on GitHub ↗

* Constructor

()

Source from the content-addressed store, hash-verified

39 * Constructor
40 */
41 constructor () {
42 super()
43 this.addSettings([
44 {
45 name: 'alphabet',
46 type: 'text',
47 value: alphabet,
48 uniqueChars: true,
49 minLength: 0,
50 maxLength: 25,
51 caseSensitivity: false
52 },
53 {
54 name: 'key',
55 type: 'text',
56 value: defaultKey,
57 whitelistChars: alphabet,
58 minLength: 2,
59 caseSensitivity: false
60 },
61 {
62 name: 'separator',
63 type: 'text',
64 value: ' ',
65 randomizable: false,
66 blacklistChars: '0123456789',
67 minLength: 1,
68 caseSensitivity: false
69 }
70 ])
71
72 // Create internal Polybius square encoder instance
73 this._polybiusSquare = new PolybiusSquareEncoder()
74 this._polybiusSquare.setSettingValues({
75 alphabet,
76 rows: '12345',
77 columns: '12345',
78 separator: '',
79 caseSensitivity: false,
80 includeForeignChars: false
81 })
82 }
83
84 /**
85 * Performs encode on given content.

Callers

nothing calls this directly

Calls 2

addSettingsMethod · 0.80
setSettingValuesMethod · 0.80

Tested by

no test coverage detected