{
  "version": 3,
  "sources": ["../src/errors.ts"],
  "sourcesContent": ["import { KeyUse } from './types.js'\n\nconst InvalidKeyUse = new Error(\"Invalid key use. Please use 'encryption' or 'signing\")\nexport const InvalidMaxValue = new Error('Max must be less than 256 and greater than 0')\n\nexport function checkValidKeyUse (use:KeyUse):void {\n    checkValid(use, [KeyUse.Sign, KeyUse.Encrypt], InvalidKeyUse)\n}\n\nfunction checkValid<T> (toCheck: T, opts: T[], error: Error): void {\n    const match = opts.some(opt => opt === toCheck)\n    if (!match) {\n        throw error\n    }\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuB;AAEvB,MAAM,gBAAgB,IAAI,MAAM,sDAAsD;AAC/E,MAAM,kBAAkB,IAAI,MAAM,8CAA8C;AAEhF,SAAS,iBAAkB,KAAiB;AAC/C,aAAW,KAAK,CAAC,oBAAO,MAAM,oBAAO,OAAO,GAAG,aAAa;AAChE;AAFgB;AAIhB,SAAS,WAAe,SAAY,MAAW,OAAoB;AAC/D,QAAM,QAAQ,KAAK,KAAK,SAAO,QAAQ,OAAO;AAC9C,MAAI,CAAC,OAAO;AACR,UAAM;AAAA,EACV;AACJ;AALS;",
  "names": []
}
