You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stringConversion.js 506B

123456789101112
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.convertStringToHex = exports.convertHexToString = void 0;
  4. function convertStringToHex(string) {
  5. return Buffer.from(string, 'utf8').toString('hex').toUpperCase();
  6. }
  7. exports.convertStringToHex = convertStringToHex;
  8. function convertHexToString(hex, encoding = 'utf8') {
  9. return Buffer.from(hex, 'hex').toString(encoding);
  10. }
  11. exports.convertHexToString = convertHexToString;
  12. //# sourceMappingURL=stringConversion.js.map