본문 바로가기

NodeJS

[개인프로젝트]md5-lite

728x90

md5-lite

프로젝트 바로가기

파일을 청크(Chunk) 사이즈 처리를 해서 성능 향상을 목적으로 만들어진 모듈입니다.
파일 크기가 200000byte(0.2MB) 이상일 경우 초기 100000byte (0.1MB)와 마지막 100000byte을 이용하여 md5 hash 처리 합니다.
그보다 크기가 작을 경우 전체 데이터의 전체를 md5 hash 처리 합니다.

사용법은 다음과 같습니다.

Installation

npm install md5-lite --save
yarn add md5-lite
bower install md5-lite --save

Usage

Javascript

const {md5Lite} = require('md5-lite');
console.log(md5Lite('./filepath'));
0486c21a4d40d0f3b0bdad3925db439e

TypeScript

import {md5Lite} from 'md5-lite';
console.log(md5Lite('./filepath'))
0486c21a4d40d0f3b0bdad3925db439e

License

License