Skip to content
Discussion options

You must be logged in to vote
> Buffer.alloc(32, 'djsakldjlsakjdasjkdjsalkdjlskajdlksjdsadjklsajdksajldksa')
<Buffer 64 6a 73 61 6b 6c 64 6a 6c 73 61 6b 6a 64 61 73 6a 6b 64 6a 73 61 6c 6b 64 6a 6c 73 6b 61 6a 64>
> Buffer.alloc(32, 'djsakldjlsakjdasjkdjsalkdjlskajdlksjdsadjklsajdksajldksafhjdshfjkdshfjksa')
<Buffer 64 6a 73 61 6b 6c 64 6a 6c 73 61 6b 6a 64 61 73 6a 6b 64 6a 73 61 6c 6b 64 6a 6c 73 6b 61 6a 64>

Notice the same buffer comes out.

What you want to do is e.g.

Buffer.from('059bde05519b5a8098f1007fc8dd28ad223378a997ed3750edfb0895859ee18d', 'hex')

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@panva
Comment options

@Hleb-Haiduk-Software
Comment options

@panva
Comment options

@Hleb-Haiduk-Software
Comment options

Answer selected by Hleb-Haiduk-Software
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants