code: function parse_cleartext_params(cleartext, algorithm) {
    const algo = enums.write(enums.publicKey, algorithm);
    const types = crypto.getPrivKeyParamTypes(algo);
    const params = crypto.constructParams(types);
    let p = 0;
  
    for (let i = 0; i < types.length && p < cleartext.length; i++) {
      p += params[i].read(cleartext.subarray(p, cleartext.length));
      if (p > cleartext.length) {
        throw new Error('Error reading param @:' + p);
      }
    }
  
    return params;
  }
docs: Helper function