
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Extremely fast number to radix64 converting.
-9007199254740991 to 9007199254740991)| Number | Result |
|---|---|
| 0 | A |
| 63 | / |
| 64 | BA |
| 4095 | // |
| 262143 | /// |
| 16777215 | //// |
| 68719476735 | ////// |
| 281474976710655 | //////// |
| 9007199254740991 | f//////// |
| -9007199254740991 | -f//////// |
npm install https://gitee.com/i8gua/n64.git
ntob(number)Takes a number, discards a fractional part and returns a string.
bton(base64)Takes a string and returns a number.
<script src="https://unpkg.com/n64/dist/n64.min.js"></script>
<script>
var number = -9007199254740991;
var base64 = numberToBase64.ntob(number);
var back = numberToBase64.bton(base64);
console.log('%s -> "%s" -> %s (%s)', number, base64, back, back === number);
</script>
Output
-9007199254740991 -> "-f////////" -> -9007199254740991 (true)
import { ntob, bton } from 'n64';
const test = (number) => {
const base64 = ntob(number);
const back = bton(base64);
console.log('%s -> "%s" -> %s (%s)', number, base64, back, back === number);
};
[0, 1, -1, 255, 65535, 4294967295, 4294967296, Date.now(), 9007199254740991].forEach(number =>
test(number)
);
Output
0 -> "A" -> 0 (true)
1 -> "B" -> 1 (true)
-1 -> "-B" -> -1 (true)
255 -> "D/" -> 255 (true)
65535 -> "P//" -> 65535 (true)
4294967295 -> "D/////" -> 4294967295 (true)
4294967296 -> "EAAAAA" -> 4294967296 (true)
1516612803738 -> "WEdKtya" -> 1516612803738 (true)
9007199254740991 -> "f////////" -> 9007199254740991 (true)
Converting 1 -> "B" -> 1
----------------------------------------------------------------
n64 x 12,522,220 ops/sec ±1.16% (79 runs sampled)
radix-64 x 5,646,873 ops/sec ±0.53% (90 runs sampled)
radixer x 9,247,606 ops/sec ±1.01% (88 runs sampled)
Converting -1 -> "-B" -> -1
----------------------------------------------------------------
n64 x 7,085,183 ops/sec ±0.65% (86 runs sampled)
radix-64 - error
radixer - error
Converting 255 -> "D/" -> 255
----------------------------------------------------------------
n64 x 7,105,757 ops/sec ±1.04% (86 runs sampled)
radix-64 x 1,625,993 ops/sec ±0.75% (88 runs sampled)
radixer x 3,096,584 ops/sec ±1.20% (89 runs sampled)
Converting 65535 -> "P//" -> 65535
----------------------------------------------------------------
n64 x 5,823,782 ops/sec ±1.11% (88 runs sampled)
radix-64 x 1,394,050 ops/sec ±1.40% (90 runs sampled)
radixer x 1,998,073 ops/sec ±0.55% (87 runs sampled)
Converting 4294967295 -> "D/////" -> 4294967295
----------------------------------------------------------------
n64 x 3,510,849 ops/sec ±0.52% (88 runs sampled)
radix-64 x 941,715 ops/sec ±1.35% (91 runs sampled)
radixer x 1,003,687 ops/sec ±0.54% (91 runs sampled)
Converting 4294967296 -> "EAAAAA" -> 4294967296
----------------------------------------------------------------
n64 x 3,284,146 ops/sec ±1.20% (89 runs sampled)
radix-64 x 931,296 ops/sec ±2.61% (87 runs sampled)
radixer x 1,561,844 ops/sec ±1.44% (85 runs sampled)
Converting 1516613323746 -> "WEdMsvi" -> 1516613323746
----------------------------------------------------------------
n64 x 3,041,711 ops/sec ±0.62% (90 runs sampled)
radix-64 x 866,496 ops/sec ±1.53% (89 runs sampled)
radixer x 1,143,080 ops/sec ±0.60% (89 runs sampled)
Converting 9007199254740991 -> "f////////" -> 9007199254740991
----------------------------------------------------------------
n64 x 2,490,628 ops/sec ±0.71% (89 runs sampled)
radix-64 x 721,063 ops/sec ±1.29% (86 runs sampled)
radixer x 659,930 ops/sec ±0.44% (90 runs sampled)
Converting -9007199254740991 -> "-f////////" -> -9007199254740991
----------------------------------------------------------------
n64 x 2,283,304 ops/sec ±1.07% (90 runs sampled)
radix-64 - error
radixer - error
FAQs
Extremely fast number to radix64 converting
We found that @1ky/n64 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.