UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

11 lines 576 B
import { decodeUint16, encodeUint16 } from "./codec/number.js"; import { mapDecoderOption } from "./codec/tlsDecoder.js"; import { contramapEncoder } from "./codec/tlsEncoder.js"; import { openEnumNumberEncoder, openEnumNumberToKey } from "./util/enumHelpers.js"; const credentialTypes = { basic: 1, x509: 2, }; export const encodeCredentialType = contramapEncoder(encodeUint16, openEnumNumberEncoder(credentialTypes)); export const decodeCredentialType = mapDecoderOption(decodeUint16, openEnumNumberToKey(credentialTypes)); //# sourceMappingURL=credentialType.js.map