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

Function CipherKeyFromBytes

packages/effect/src/Schema.ts:14765–14774  ·  view source on GitHub ↗
(
  algorithm: A,
  options?: CryptoKeyOptions
)

Source from the content-addressed store, hash-verified

14763 * @since 4.0.0
14764 */
14765export const CipherKeyFromBytes = <A extends Cipher_.Algorithm>(
14766 algorithm: A,
14767 options?: CryptoKeyOptions
14768): decodeTo<CipherKey<A>, Uint8Array> =>
14769 cryptoKeyFromBytes(
14770 "CipherKeyFromBytes",
14771 CipherKey(algorithm),
14772 (bytes) => Cipher_.key(algorithm, bytes),
14773 options?.allowEncode === true ? Cipher_.toBytes : undefined
14774 )
14775
14776/**
14777 * Schema that decodes a `Cipher.Key` from a JWK with

Callers

nothing calls this directly

Calls 3

cryptoKeyFromBytesFunction · 0.85
CipherKeyFunction · 0.70
keyMethod · 0.65

Tested by

no test coverage detected