Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
base64-binary
Advanced tools
A polyfill built upon atob/btoa (browser side only) so as to support base64 to/from binary (Uint8Array/ArrayBuffer) conversion
A polyfill built upon atob/btoa (browser) so as to support base64 to/from binary (Uint8Array/ArrayBuffer) conversion
It seems that the built-in atob and btoa functions don't support encoding binary (Uint8Array or ArrayBuffer) to base64 string and decoding base64 string to binary directly. However, with the help of this polyfill which adds a thin layer to make extra conversion between String and Uint8Array, we can make it by standing on the shoulders of giants.
Add reference in your HTML file
...
<script type="text/javascript" src="/path/to/base64-lite.js"></script>
...
Now you can make base64 codec for binary data
const bin = base64.decode("hzw4NdSJ0NzaEKo9hSKiH+X5ViFAh+hmYDuorCqDjEk=");
console.log(base64.encode(bin));
Browser with ES5 support
Written in 2019 by tibetty xihua.duan@gmail.com
FAQs
A polyfill built upon atob/btoa (browser side only) so as to support base64 to/from binary (Uint8Array/ArrayBuffer) conversion
The npm package base64-binary receives a total of 22 weekly downloads. As such, base64-binary popularity was classified as not popular.
We found that base64-binary demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.