- Version: 0.12-5.x
- Platform: Mac OS X El Capitan
- Subsystem: Buffer
Encoding and Decoding a new Buffer object with base64 results in garbled or missing data.
> new Buffer('hello', 'base64').toString('base64');
'hell'
> new Buffer('helloIsItMeYourLookingFor', 'base64').toString('base64');
'helloIsItMeYourLookingFo'
> new Buffer('helloIsItMe', 'base64').toString('base64');
'helloIsItMc='
>
Notice how in the first and second example, the last character is missing, and in the third example, there are extra characters appended to the output.
cc/ @trevnorris
Encoding and Decoding a new
Bufferobject withbase64results in garbled or missing data.Notice how in the first and second example, the last character is missing, and in the third example, there are extra characters appended to the output.
cc/ @trevnorris