ESM: Added Hex ops and created a Hex library.

This commit is contained in:
n1474335 2018-04-02 18:06:48 +01:00
parent 0011e9caa8
commit eeb1d0a891
18 changed files with 391 additions and 196 deletions

View file

@ -3,6 +3,7 @@ import removeEXIF from "../vendor/remove-exif.js";
import Utils from "../Utils.js";
import FileType from "./FileType.js";
import {fromBase64, toBase64} from "../lib/Base64";
import {fromHex} from "../lib/Hex";
/**
@ -92,7 +93,7 @@ const Image = {
// Convert input to raw bytes
switch (inputFormat) {
case "Hex":
input = Utils.fromHex(input);
input = fromHex(input);
break;
case "Base64":
// Don't trust the Base64 entered by the user.