MCPcopy Create free account
hub / github.com/Effect-TS/effect / cryptoAlgorithmPayload

Function cryptoAlgorithmPayload

packages/effect/src/Schema.ts:14422–14428  ·  view source on GitHub ↗
(algorithm: CryptoAlgorithm)

Source from the content-addressed store, hash-verified

14420 (self.name === that.name && self.hash?.name === that.hash?.name && self.saltLength === that.saltLength)
14421
14422const cryptoAlgorithmPayload = (algorithm: CryptoAlgorithm): Json => {
14423 const payload: { [key: string]: Json } = { name: algorithm.name }
14424 if (algorithm.hash !== undefined) payload.hash = algorithm.hash.name
14425 if (algorithm.modulusLength !== undefined) payload.modulusLength = algorithm.modulusLength
14426 if (algorithm.saltLength !== undefined) payload.saltLength = algorithm.saltLength
14427 return payload
14428}
14429
14430const declareCryptoKey = <K extends { readonly algorithm: CryptoAlgorithm }>(
14431 name: string,

Callers 1

declareCryptoKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected