| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
- FileChannel
- Vite
- Python
- cli
- vim
- pandas
- tauri
- vscode
- podman
- curl
- value_counts
- io
- Webpack
- json
- 정렬
- Java
- scaler
- Docker Compose
- yaml
- UV
- Mode
- Typescript
- 최빈값
- Ollama
- PowerShell
- RandomAccessFile
- scikit-learn
- json schema
- CSS
- docker
- Today
- Total
목록개발/TypeScript (2)
워로디스
파일이나 바이너리 데이터를 내용 기반 식별자(Content ID) 로 만들고 싶다면 다음 구조가 가장 단순하고 실용적이다.Uint8Array ↓SHA-256 ↓앞 16바이트 사용 (128bit) ↓hex 또는 base64url 문자열1. 해시 알고리즘: SHA-256브라우저나 Web Crypto API를 사용할 수 있는 환경이라면 SHA-256이 무난하다.const digest = new Uint8Array( await crypto.subtle.digest("SHA-256", data));digest는 32바이트, 즉 256비트의 Uint8Array다.SHA-1도 단순 파일 식별 용도로는 우연 충돌 가능성이 충분히 낮을 수 있지만, 이미 암호학적 충돌 저항성이 깨진 알고리즘이다. 새 시스템이라면 ..
프로젝트 구성 절차mkdir test-libcd test-libnpm init -ynpm pkg set main=dist/index.jsnpm pkg set types=dist/index.d.tsnpm pkg set exports=./dist/index.jsnpm pkg set type=modulenpm pkg set scripts.build=tsc 배포에 dist 만 포함npm pkg set files[0]=distnpm install -D typescriptnpx tsc --init --rootDir ./src --outDir ./distmkdir srcNew-Item ./src/index.tsindex.ts 예시다시 내보내기 방식export * from "./math.js"; export * fr..
