<script src="https://unpkg.com/hex-converter@1.0.0/hex-converter.js"></script>
$ npm install hex-converter
import HexConverter from 'path/to/hex-converter';
const HexConverterClass = require("path/to/hex-converter");
result = HexConverter.int2hex(num);
result = HexConverter.hex2int(hex);
result = HexConverter.hex2bin(hex);
result = HexConverter.bin2hex(bin);
result = HexConverter.hex2oct(hex);
result = HexConverter.oct2hex(oct);
result = HexConverter.hex2any(hex, radix);
result = HexConverter.any2hex(str, fromRadix);
本项目可以作为数学计算库,嵌入到数学应用中。
程序员通常涉及十六进制、十进制、二进制和八进制之间的相互计算。
本项目支持十六进制和任意进制之间的转换,可用于对敏感数据编码和解码。
@misc{CNOCTAVE2025, author = {Yu Hongbo, }, title = {hex-converter}, year = {2025}, howpublished = {\url{https://github.com/CNOCTAVE/hex-converter}}, }
@techreport{CNOCTAVE2025, author = {Yu Hongbo, }, title = {hex-converter Document}, institution = {BA DU XIN SHANG}, year = {2025}, number = {16}, month = {6}, url = {https://cnoctave.github.io/hex-converter/index.html}, urldate = {2025-06-16}, }