( format: KeyFormat_.Format<"secret", "decode", Data>, algorithm: A, options?: CryptoKeyOptions )
| 14789 | * @since 4.0.0 |
| 14790 | */ |
| 14791 | export const CipherKeyFromFormat = <A extends Cipher_.Algorithm, Data>( |
| 14792 | format: KeyFormat_.Format<"secret", "decode", Data>, |
| 14793 | algorithm: A, |
| 14794 | options?: CryptoKeyOptions |
| 14795 | ): decodeTo<CipherKey<A>, Codec<Data>> => |
| 14796 | cryptoKeyFromFormat( |
| 14797 | "CipherKeyFromFormat", |
| 14798 | CipherKey(algorithm), |
| 14799 | format, |
| 14800 | (data) => |
| 14801 | KeyFormat_.decodeSecret(format, algorithm, data) as Effect.Effect<Cipher_.Key<A>, CryptoError_.CryptoError>, |
| 14802 | options?.allowEncode === true |
| 14803 | ) |
| 14804 | |
| 14805 | /** |
| 14806 | * Type-level representation of {@link SignaturePublicKey}. |
nothing calls this directly
no test coverage detected