UNPKG

@hazae41/x509

Version:

Zero-copy X.509 certificates in pure modern TypeScript

12 lines (9 loc) 388 B
import { DER, DERCursor } from '@hazae41/asn1'; import { Readable } from '@hazae41/binary'; function readAndResolveFromBytesOrThrow(resolvable, bytes) { const triplet = Readable.readFromBytesOrThrow(DER, bytes); const cursor = new DERCursor([triplet]); return resolvable.resolveOrThrow(cursor); } export { readAndResolveFromBytesOrThrow }; //# sourceMappingURL=read.mjs.map