UNPKG

@trust/keyto

Version:

A utility for translating cryptographic keys between representations

22 lines (19 loc) 524 B
'use strict' module.exports = registry => { let Version = registry.normalize('Version') let OtherPrimeInfos = registry.normalize('OtherPrimeInfos') return function () { this.seq().obj( this.key('version').use(Version), this.key('n').int(), this.key('e').int(), this.key('d').int(), this.key('p').int(), this.key('q').int(), this.key('dp').int(), this.key('dq').int(), this.key('qi').int(), this.key('other').optional().use(OtherPrimeInfos) ) } }