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.
 
 
 
 
 
 

761 B

Increment

Cryptographic algorithms use a binary representation of variables internally (Buffer in nodejs). Hexadecimal representation is used to facilitate human reading. To get more familiar with the hexadecimal form, we will do a simple operation.

Instructions

Create a function increment that takes as argument a number written in hexadecimal form and returns the same number incremented by one.

Usage

increment('03') // expected : <Buffer 04>
increment('a0') // expected : <Buffer a1>
increment('ff') // expected : <Buffer 01 00>
increment('d537') // expected : <Buffer d5 38>

Notions