ESM: Added remaining Base64 ops and created a Base64 library. Added the prefer-const eslint rule.

This commit is contained in:
n1474335 2018-04-02 17:10:51 +01:00
parent 9b4fc3d3aa
commit 041cd9fb8e
30 changed files with 986 additions and 825 deletions

View file

@ -1,4 +1,5 @@
import Utils from "../Utils.js";
import {fromBase64} from "../lib/Base64";
import * as r from "jsrsasign";
@ -43,7 +44,7 @@ const PublicKey = {
cert.readCertPEM(input);
break;
case "Base64":
cert.readCertHex(Utils.toHex(Utils.fromBase64(input, null, "byteArray"), ""));
cert.readCertHex(Utils.toHex(fromBase64(input, null, "byteArray"), ""));
break;
case "Raw":
cert.readCertHex(Utils.toHex(Utils.strToByteArray(input), ""));