Showing
1 changed file
with
3 additions
and
1 deletions
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | +const _ = require('lodash'); | ||
4 | + | ||
3 | const utf8ToHex = (string) => { | 5 | const utf8ToHex = (string) => { |
4 | var buf = new Buffer(string, 'utf8'); | 6 | var buf = new Buffer(string, 'utf8'); |
5 | 7 | ||
6 | - return buf.toString('hex'); | 8 | + return _.toUpper(buf.toString('hex')); |
7 | }; | 9 | }; |
8 | 10 | ||
9 | const hexToUtf8 = (string) => { | 11 | const hexToUtf8 = (string) => { |
-
Please register or login to post a comment