npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

uit-authenticator

v1.0.1

Published

Encrypt passwords and authenticate against auth.uit.edu.vn from Node.js.

Readme

uit-authenticator

Dependency-free Node.js helpers for:

  • encrypting a UIT password in a reversible format
  • decrypting that password later
  • logging into https://auth.uit.edu.vn
  • returning the profile full name and student ID from UserProfile.aspx

The root package is Node-only. For browser/Vite projects, import the browser-safe crypto helpers from uit-authenticator/browser.

Install

npm install uit-authenticator

Usage

import {
  encryptPassword,
  authenticateWithEncryptedPassword,
} from "uit-authenticator";

const secret = process.env.UIT_AUTH_SECRET;
const encryptedPassword = encryptPassword("plain-password", secret);

const profile = await authenticateWithEncryptedPassword({
  username: "22520001",
  encryptedPassword,
  secret,
});

console.log(profile.fullName);
console.log(profile.studentId);

If you already have the plain password, use authenticateWithPassword(...) directly.

Browser / Vite

Use the browser subpath if you only need reversible encryption in client code:

import { encryptPassword } from "uit-authenticator/browser";

const encryptedPassword = await encryptPassword("plain-password", "shared-secret");

This browser entry uses Web Crypto and emits a v2 payload that the Node decryptPassword(...) helper can read. The root package remains Node-only because the authentication helpers depend on node:http, node:https, and other server APIs.

API

encryptPassword(password, secret)

Encrypts the password with AES-256-GCM and returns a compact string.

decryptPassword(encryptedPassword, secret)

Decrypts a string produced by the Node encryptPassword(...) helper or the browser uit-authenticator/browser helper.

authenticateWithEncryptedPassword(options)

Accepts:

  • username
  • encryptedPassword
  • secret
  • optional loginUrl
  • optional profilePath
  • optional timeoutMs
  • optional userAgent
  • optional rejectUnauthorized

Returns:

{
  username,
  fullName,
  studentId,
  loginUrl,
  profileUrl,
  finalUrl,
  profileHtml
}