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

vobi_lib

v1.7.11

Published

Vobi Library

Downloads

219

Readme

Vobi Library

Biblioteca utilitária com funções para criptografia, upload de arquivos, processamento de imagens e muito mais.

📦 Instalação

npm install vobi_lib

⚠️ Dependência Importante: Sharp

Para usar as funções de processamento de imagem, você precisa instalar o Sharp separadamente:

# Para AWS Lambda ARM64 (recomendado)
npm install --platform=linux --arch=arm64 sharp

# Para AWS Lambda x86_64
npm install --platform=linux --arch=x64 sharp

# Para desenvolvimento local
npm install sharp

📖 Guia completo de instalação do Sharp

🚀 Funcionalidades

🔐 Criptografia

Essa função permite criptografar um texto utilizando o algoritmo AES (Advanced Encryption Standard) com uma chave fornecida.

Uso

import { encrypt } from "vobi-lib";

const texto = "Mensagem secreta";
const chave = "chave-secreta";

const textoCriptografado = encrypt(texto, chave);
console.log("Texto criptografado:", textoCriptografado);

Parâmetros

  • ciphertext: O texto a ser criptografado. Pode ser de qualquer tipo que seja serializável em JSON.
  • hashToken: A chave de criptografia, uma string utilizada para gerar a chave AES.

Retorno

Retorna uma string contendo o texto criptografado.

Caso ocorra algum erro durante o processo de criptografia, a função lançará uma exceção do tipo Error.

Exemplo

import { encrypt } from "vobi-lib";

const texto = "Mensagem secreta";
const chave = "chave-secreta";

try {
  const textoCriptografado = encrypt(texto, chave);
  console.log("Texto criptografado:", textoCriptografado);
} catch (error) {
  console.error("Ocorreu um erro ao criptografar o texto:", error);
}

Função de Descriptografia

Esta função é responsável por decifrar um texto cifrado utilizando o algoritmo AES (Advanced Encryption Standard) com uma chave fornecida.

Uso

import { decrypt } from "./caminho/para/o/arquivo";

const ciphertext = "texto_cifrado"; // Substitua 'texto_cifrado' pelo seu texto cifrado
const vaultToken = "sua_chave_secreta"; // Substitua 'sua_chave_secreta' pela sua chave de descriptografia

try {
  const decryptedText = decrypt(ciphertext, vaultToken);
  console.log(decryptedText);
} catch (error) {
  console.error("Erro ao descriptografar:", error);
}

Parâmetros

  • ciphertext: Texto cifrado que será decifrado.
  • vaultToken: Chave de descriptografia.

Retorno

Retorna um objeto decifrado a partir do texto cifrado fornecido.

Exemplo

const ciphertext = "U2FsdGVkX1+Jp7JH+QfZKzKfFgMqSx+GKnt+J+Lsm2I="; // Texto cifrado
const vaultToken = "minha_chave_secreta"; // Chave de descriptografia

try {
  const decryptedData = decrypt(ciphertext, vaultToken);
  console.log(decryptedData);
} catch (error) {
  console.error("Erro ao descriptografar:", error);
}

Este exemplo irá decifrar o texto cifrado U2FsdGVkX1+Jp7JH+QfZKzKfFgMqSx+GKnt+J+Lsm2I= utilizando a chave de descriptografia minha_chave_secreta e irá imprimir o objeto decifrado no console.

Certifique-se de substituir texto_cifrado pelo seu próprio texto cifrado e sua_chave_secreta pela sua chave de descriptografia.