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.
uuid-base62
Advanced tools
Base62 non-sequential url-friendly UUID generator (RFC4122)
uuid-base62 makes it easy to generate short base62 (or any other base) UUIDs. The unencoded UUIDs are generated by node-uuid which follows RFC4122. The encoded UUIDs are alphanumeric [0-9a-zA-Z] and always have a length of 22 chars.
npm i uuid-base62 -S
var uuidBase62 = require('uuid-base62');
var uuid = uuidBase62.v4();
// -> 2qY9COoAhfMrsH7mCyh86T
// if the original uuid is needed
var originalUuid = uuidBase62.decode(uuid);
// -> 9af099b2-6244-4fc1-b72b-1d69a24481b7
// if an uuid needs to be encoded
var encoded = uuidBase62.encode('8fc60e7c-3b3c-48e9-a6a7-a5fe4f1fbc31');
// -> 2fNwVYePN8WqqDFvVf7XMN
That's it. uuid-base62 also supports other bases, example for base64:
uuidBase62.customBase = new uuidBase62.baseX("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_");
var uuid = uuidBase62.v4();
// -> 31LoSI_BVeQpXtwu_-GEbL
For more examples check the tests.
MIT
FAQs
Base62 non-sequential url-safe UUID generator (RFC4122)
We found that uuid-base62 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.