sweetpalma / goothereum

⛓️ Сryptocurrency done in 160 lines of JavaScript.

Home Page:https://medium.com/@sweetpalma/goothereum-blockchain-in-160-lines-of-javascript-8052ca448857

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3 Long mysterious constants??!!

benzmuircroft opened this issue · comments

const t = '308184020100301006072a8648ce3d020106052b8104000a046d306b0201010420';
const k = Buffer.from(t + key + 'a144034200' + user, 'hex').toString('base64');

const t = '3056301006072a8648ce3d020106052b8104000a034200';

how did you come up with the 3 strings in bold? Can you explane these please? I read your article and these where the only things I felt confused by

From your article -

Wallet Converters: Utility that converts raw HEX keys stored in the wallet into a PEM-encoded certificates used by Node. Long mysterious constant is an ASN-encoded binary header used to tag private and public parts of the resulting key

... "Long mysterious constant is an ASN-encoded binary header" <--- that right there!!

The whole article was really good except ^^that leaves a gaping hole in my understanding