open-index/open-npm huggingface dataset:
npm package: @rahulxf/about-me
Description: A small npx package that prints a clean Rahul Vishwakarma intro, optional detailed output, and a bundled formatted llm.txt resume.
Author: Rahul Vishwakarma
Latest version: 1.4.0

# @rahulxf/about-me

A small `npx` package that prints a clean intro plus links, with optional detailed modes.

## Usage

```bash
npx @rahulxf/about-me
npx @rahulxf/about-me --more
npx @rahulxf/about-me --resume
```

## What it shows

- a clean default intro and main links
- an extended `--more` mode for work, OSS, projects, and guidance
- a bundled formatted `llm.txt` resume

## Flags

- `--more` prints more details about work, OSS, projects, and GSoC/LFX guidance
- `--resume` prints the bundled `llm.txt` resume with spacing and colors
- `--help` shows the CLI help text

## Main links

- Website: [rahulxf.com](https://rahulxf.com)
- GitHub: [github.com/manzil-infinity180](https://github.com/manzil-infinity180)
- Blog: [rahulxf.com/blog](https://rahulxf.com/blog)
- OSS / GSoC page: [rahulxf.com/oss](https://rahulxf.com/oss)

## Inspiration

Inspired by [Sambego/about-me-npm](https://github.com/Sambego/about-me-npm) and the published package [`@sambego/about-me`](https://www.npmjs.com/package/@sambego/about-me).
npm package: @rahulxsh/secure-client
Description: Browser hybrid encryption (RSA-OAEP + AES-256-GCM) using the WebCrypto API
Latest version: 1.1.0

# @rahulxsh/secure-client

Browser hybrid encryption (RSA-OAEP + AES-256-GCM) using the WebCrypto API. Encrypt data in the browser so only your server can read it.

## Install

```bash
npm install @rahulxsh/secure-client @rahulxsh/secure-core
```

## Quick example (RSA)

```js
import {
  encryptRequest,
  decryptResponse,
  generateEphemeralKeyPair,
  exportPublicKeySpki,
  importRsaPublicKey,
  importRsaPrivateKey,
} from "@rahulxsh/secure-client";

// 1. Server: generate key pair once (or use your existing RSA key)
const keyPair = await generateEphemeralKeyPair();
const publicKeyPem = await exportPublicKeySpki(keyPair.publicKey);
// Send publicKeyPem to the client (e.g. via your API or config).

// 2. Client: encrypt request with server's public key
const serverPublicKey = await importRsaPublicKey(publicKeyPem);
const encrypted = await encryptRequest(
  { userId: "123", action: "submit" },
  serverPublicKey,
  "key-v1"
);
// POST encrypted to your API.

// 3. Client: decrypt encrypted response from server (using your client key pair)
const responseData = await decryptResponse(encryptedResponseFromServer, yourClientKeyPair.privateKey);
```

## ECDH and X25519

Same pattern with different functions:

```js
import {
  generateEcdhKeyPair,
  encryptRequestEcdh,
  decryptResponseEcdh,
} from "@rahulxsh/secure-client";

const ecdhPair = await generateEcdhKeyPair();
const encrypted = await encryptRequestEcdh(data, serverEcdhPublicKey, "ecdh-v1");
const decrypted = await decryptResponseEcdh(encryptedResponse, ecdhPair.privateKey);
```

```js
import {
  generateX25519KeyPair,
  encryptRequestX25519,
  decryptResponseX25519,
} from "@rahulxsh/secure-client";

const x25519Pair = await generateX25519KeyPair();
const encrypted = await encryptRequestX25519(data, serverX25519PublicKey, "x25519-v1");
const decrypted = await decryptResponseX25519(encryptedResponse, x25519Pair.privateKey);
```

## Algorithms

| Algorithm              | Key exchange   | Use when              |
|-----------------------|----------------|------------------------|
| RSA-OAEP-AES-256-GCM  | RSA public key | Simple client→server   |
| ECDH-AES-256-GCM      | P-256          | Forward secrecy        |
| X25519-AES-256-GCM    | X25519         | Forward secrecy        |

## License

MIT
npm package: @rahulxsh/secure-core
Description: Shared types and pure utility helpers for secure hybrid encryption
Latest version: 1.1.0

# @rahulxsh/secure-core

Shared types and pure utility helpers for secure hybrid encryption. Used by `@rahulxsh/secure-client` and `@rahulxsh/secure-server`. Zero runtime dependencies.

## Install

```bash
npm install @rahulxsh/secure-core
```

## Usage

```js
import {
  toBase64Url,
  fromBase64Url,
  randomBytes,
  randomNonce,
  stringToBytes,
  bytesToString,
  assertValidPayload,
} from "@rahulxsh/secure-core";

// Encode / decode base64url (used in payloads)
const encoded = toBase64Url(new Uint8Array([1, 2, 3]));
const decoded = fromBase64Url(encoded);

// Random bytes and nonces
const bytes = randomBytes(32);
const nonce = randomNonce();

// String ↔ bytes
const bytes = stringToBytes("hello");
const str = bytesToString(bytes);

// Validate encrypted payload shape (throws if invalid)
assertValidPayload(payload);
```

## API

- **Types:** `EncryptedPayload`, `KeyPair`, `EncryptOptions`, `SupportedAlgorithm`
- **Base64url:** `toBase64Url`, `fromBase64Url`
- **Random:** `randomBytes`, `randomNonce`
- **Buffer:** `stringToBytes`, `bytesToString`, `arrayBufferToBytes`, `concatBytes`
- **Time:** `nowSeconds`, `isFresh`
- **Validation:** `assertValidPayload`, `PayloadValidationError`

## License

MIT
npm package: @rahulxsh/secure-server
Description: Node.js hybrid encryption (RSA-OAEP + AES-256-GCM) for backend services
Latest version: 1.1.0

# @rahulxsh/secure-server

Node.js hybrid encryption (RSA-OAEP + AES-256-GCM) for backend services. Decrypt requests from the client and encrypt responses. Uses `node:crypto` only.

## Install

```bash
npm install @rahulxsh/secure-server @rahulxsh/secure-core
```

**Node.js 18+**

## Quick example (RSA)

```js
import {
  decryptRequest,
  encryptResponse,
  generateEphemeralKeyPair,
  exportPublicKeySpki,
  importRsaPublicKey,
  importRsaPrivateKey,
} from "@rahulxsh/secure-server";

// 1. Generate server key pair once
const keyPair = await generateEphemeralKeyPair();
const publicKeyPem = await exportPublicKeySpki(keyPair.publicKey);
// Expose publicKeyPem to clients (e.g. GET /api/public-key).

// 2. In your API: decrypt incoming request body
app.post("/api/secure", async (req, res) => {
  const payload = req.body; // EncryptedPayload from client
  try {
    const data = await decryptRequest(payload, keyPair.privateKey);
    // Use data (e.g. { userId, action })...
    const result = { success: true };
    const encrypted = await encryptResponse(result, clientPublicKey, "key-v1");
    res.json(encrypted);
  } catch (e) {
    if (e.name === "DecryptionError") return res.status(400).json({ error: "Decryption failed" });
    throw e;
  }
});
```

## ECDH and X25519

```js
import {
  generateEcdhKeyPair,
  decryptRequestEcdh,
  encryptResponseEcdh,
} from "@rahulxsh/secure-server";

const ecdhPair = await generateEcdhKeyPair();
const data = await decryptRequestEcdh(payload, ecdhPair.privateKey);
const encrypted = await encryptResponseEcdh(responseData, clientEcdhPublicKey, "ecdh-v1");
```

```js
import {
  generateX25519KeyPair,
  decryptRequestX25519,
  encryptResponseX25519,
} from "@rahulxsh/secure-server";

const x25519Pair = await generateX25519KeyPair();
const data = await decryptRequestX25519(payload, x25519Pair.privateKey);
const encrypted = await encryptResponseX25519(responseData, clientX25519PublicKey, "x25519-v1");
```

## Multi-key (key rotation)

Use the `kid` in the payload to choose the right private key:

```js
const keys = { "key-v1": privateKey1, "key-v2": privateKey2 };
const data = await decryptRequest(payload, keys[payload.kid]);
```

## License

MIT