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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@uxbooster/crypto

v1.0.0

Published

Crypto utility library for UX Booster.

Downloads

4

Readme

@uxbooster/crypto

이 패키지는 암호화 관련 유틸리티 함수들을 제공합니다.

설치

npm install @uxbooster/crypto

사용법

import { encrypt } from '@uxbooster/crypto';
import { randomBytes } from 'crypto';

const key = randomBytes(32);
const plainText = 'Hello, UX Booster!';

// 암호화
const encryptedData = encrypt(plainText, key);
console.log(encryptedData);

// 복호화 예제
const decryptedText = decrypt(encryptedData, key);
console.log(decryptedText); // 출력: 'Hello, UX Booster!'

함수 목록

이 패키지에서 제공하는 함수 목록은 다음과 같습니다.

| 함수 이름 | 설명 | 예제 | | ----------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | decrypt | 암호화된 문자열을 AES-GCM 알고리즘을 사용하여 복호화합니다. | decrypt('aHR0cDovL2xvY2FsaG9zdDo4MDgwLwAAAAB1P71Pls4NsfVQ==', key) - 'Hello, UX Booster!' | | encrypt | 주어진 텍스트를 AES-GCM 알고리즘을 사용하여 암호화합니다. | encrypt('Hello, UX Booster!', key) - base64로 인코딩된 암호문 문자열 | | generateRSAKeyPair | RSA 공개 키와 개인 키 쌍을 생성합니다. | generateRSAKeyPair() - 공개키와 개인키 객체를 반환합니다. | | rsaDecrypt | RSA 개인 키를 사용하여 암호화된 데이터를 복호화합니다. | rsaDecrypt(encryptedData, privateKey) - 복호화된 평문 문자열 반환 | | rsaEncrypt | RSA 공개 키를 사용하여 텍스트를 암호화합니다. | rsaEncrypt('Hello, UX Booster!', publicKey) - 암호화된 데이터 문자열 반환 | | sha256Hash | 주어진 데이터를 SHA-256 알고리즘으로 해싱합니다. | sha256Hash('example') - '50d8589b6318edc93f7cf7c2d747c6c5d2e2c873a74fc6c7e15c2b84738e4d02' |