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

Method performEncode

src/Encoder/Hash.js:87–90  ·  view source on GitHub ↗

* Performs encode on given content. * @protected * @param {Chain} content * @return {number[]|string|Uint8Array|Chain|Promise} Encoded content

(content)

Source from the content-addressed store, hash-verified

85 * @return {number[]|string|Uint8Array|Chain|Promise} Encoded content
86 */
87 performEncode (content) {
88 const algorithmName = this.getSettingValue('algorithm')
89 return this.createDigest(algorithmName, content.getBytes())
90 }
91
92 /**
93 * Creates message digest using given algorithm.

Callers

nothing calls this directly

Calls 3

createDigestMethod · 0.95
getSettingValueMethod · 0.80
getBytesMethod · 0.80

Tested by

no test coverage detected