- red hat, centos
- yum install openssl
- ubuntu
- apt-get install openssl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// AES-256과 HMAC을 사용하여 문자열을 암호화하고 위변조를 방지하는 법. | |
// 비밀번호는 서버만 알고 있어야 한다. 절대 클라이언트에게 전송해서는 안된다. | |
// PHP 5.2 이상, mcrypt 모듈이 필요하다. | |
// 문자열을 암호화한다. | |
function aes_encrypt($plaintext, $password) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Based on Stackoverflow Answer: http://stackoverflow.com/a/12525165/353550 | |
''' | |
import base64 | |
from Crypto.Cipher import AES | |
from Crypto import Random | |
BS = 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func _request(url: String, data: String) -> Void { | |
var req = URLRequest(url: URL(string: url)!) | |
req.httpMethod = "POST" | |
req.httpBody = data.data(using: String.Encoding.utf8) | |
//let session = URLSession.shared | |
let session = URLSession(configuration: URLSessionConfiguration.default) | |
let task = session.dataTask(with: req) {data, response, error in | |
if error != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
</head> | |
<body> | |
<style> | |
.pagination { | |
display: inline-block; | |
clear: both; | |
float: right; |
이 강의를 들으면서 https://www.youtube.com/watch?v=Xcy2Pq6LABk&feature=youtu.be&list=PLqaSEyuwXkSoxouWmQKMHXYDozPiyjNXO
- 기초부터 쌓은후 만들어가는 방식
대부분의 교육이 그러하다, 당연하다고 생각한다
- 초중고 12 + 대 4 년동안 목적(만들고 싶은)이 없는 상태에서 지식을 학습하는 것에만 집중
- 과정을 소화하는 일부 학생에 초점을 맞춘 교육 방식
https://mvnrepository.com/artifact/org.springframework.security/spring-security-crypto
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
npm install --save express body-parser jsonwebtoken
OlderNewer