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

Function KeyWrapKeyFromBytes

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

Source from the content-addressed store, hash-verified

15234 * @since 4.0.0
15235 */
15236export const KeyWrapKeyFromBytes = <A extends KeyWrap_.AesKw>(
15237 algorithm: A,
15238 options?: CryptoKeyOptions
15239): decodeTo<KeyWrapKey<A>, Uint8Array> =>
15240 cryptoKeyFromBytes(
15241 "KeyWrapKeyFromBytes",
15242 KeyWrapKey(algorithm),
15243 (bytes) => KeyWrap_.key(algorithm, bytes),
15244 options?.allowEncode === true ? KeyWrap_.toBytes : undefined
15245 )
15246
15247/**
15248 * Schema that decodes an AES-KW `KeyWrap.Key` from a JWK with

Callers

nothing calls this directly

Calls 3

cryptoKeyFromBytesFunction · 0.85
KeyWrapKeyFunction · 0.70
keyMethod · 0.65

Tested by

no test coverage detected