( algorithm: A, options?: CryptoKeyOptions )
| 14596 | * @since 4.0.0 |
| 14597 | */ |
| 14598 | export const MacKeyFromBytes = <A extends Mac_.Algorithm>( |
| 14599 | algorithm: A, |
| 14600 | options?: CryptoKeyOptions |
| 14601 | ): decodeTo<MacKey<A>, Uint8Array> => |
| 14602 | cryptoKeyFromBytes( |
| 14603 | "MacKeyFromBytes", |
| 14604 | MacKey(algorithm), |
| 14605 | (bytes) => Mac_.key(algorithm, bytes), |
| 14606 | options?.allowEncode === true ? Mac_.toBytes : undefined |
| 14607 | ) |
| 14608 | |
| 14609 | /** |
| 14610 | * Schema that decodes a `Mac.Key` from a JWK with `KeyFormat.decodeSecret`. |
nothing calls this directly
no test coverage detected