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

Method _getVariant

src/Encoder/BaconCipher.js:195–204  ·  view source on GitHub ↗

* Composes a spec for the currently selected variant. * @protected * @return {object}

()

Source from the content-addressed store, hash-verified

193 * @return {object}
194 */
195 _getVariant () {
196 const variant = this.getSettingValue('variant')
197 const { alphabet, codeAlphabet } =
198 variantSpecs.find(spec => spec.name === variant)
199
200 const codeLength = codeAlphabet.length / alphabet.length
201 const codes = StringUtil.chunk(codeAlphabet, codeLength)
202
203 return { alphabet, codes, codeLength }
204 }
205}

Callers 2

performEncodeMethod · 0.95
performDecodeMethod · 0.95

Calls 2

getSettingValueMethod · 0.80
chunkMethod · 0.45

Tested by

no test coverage detected