티스토리 뷰
암호화 알고리즘
1. 대칭키 알고리즘(Symmetric Encryption) : 암호화 - 복호화 할 때 같은 키값을 이용
2. 비대칭키 알고리즘(Asymmetric Encryption) : 암호화 - 복호화 할 때 다른 키값을 이용
3. 해싱(hashing) : 단방향으로 암호화만 가능하고 복호화 할 수 없다. 비밀번호 등에 이용.
알고리즘 | 종류 | 비고 |
대칭키 | DES, 3-DES, AES(128bit, 256bit), SEED, ARIA | AES가 가장 보편적으로 이용 |
비대칭키 | RSA, ECC, DSS | |
해싱 | MD5, SHA-0, SHA-1, SHA-2 |
crytojs는 자바스크립트 기반으로 암/복호화를 제공하는 라이브러리로 쉽고 간단하게 적용 가능하다.
사이트 : cryptojs.gitbook.io/docs/
CryptoJS
Original documentation: https://code.google.com/archive/p/crypto-js/
cryptojs.gitbook.io
cryptojs cdn 링크 : cdnjs.com/libraries/crypto-js
crypto-js - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers
JavaScript library of crypto standards. - Simple. Fast. Reliable. Content delivery at its finest. cdnjs is a free and open-source CDN service trusted by over 10% of websites, powered by Cloudflare. We make it faster and easier to load library files on your
cdnjs.com
간단예제
var CryptoJS = require("crypto-js");
var data = [{id: 1}, {id: 2}]
// Encrypt
var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString();
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
console.log(decryptedData); // [{id: 1}, {id: 2}]
출처 : www.npmjs.com/package/crypto-js
crypto-js
JavaScript library of crypto standards.
www.npmjs.com
cryptoJs는 브라우저에 간단하게 설치할 수 있으며 누구나 쉽게 적용할 수 있습니다.
'UI(Front-End)' 카테고리의 다른 글
Web Storage(localStorage, sessionStorage) 예제 (0) | 2020.11.16 |
---|---|
SheetJS : JS로 엑셀 파일 쓰기 예제 (9) | 2019.06.30 |
SheetJS : JS로 엑셀 파일 읽기 예제 (16) | 2019.06.29 |
웹 호환모드 설정 (0) | 2019.06.19 |
- Total
- Today
- Yesterday
- 메시지
- springboot
- 엑셀
- REST
- Spring Boot
- 설정
- 스프링부트
- 그리드
- 타임리프
- mapToList
- 스프링
- java
- lombok
- oracle
- AG-GRID
- mybatis
- restful서비스
- sample
- ag grid
- cache
- SHEETJS
- UI
- thymeleaf
- Javascript
- 샘플
- listToMap
- 예제
- RESTful
- example
- spring
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |