출처 : https://github.com/trezor/python-mnemonic

 

 

git clone https://github.com/trezor/python-mnemonic.git

python3 setup.py build

pip3 install -r  requirements.txt

 root@3384f126abe2:/home/python-mnemonic# python3 generate_vectors.py
input    : 00000000000000000000000000000000 (128 bits)
mnemonic : abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about (12 words)
seed     : c55257c360c07c72029aebc1b53c05ed0362ada38ead3e3e9efa3708e53495531f09a6987599d18264c1e1c92f2cf141630c7a3c4ab7c81b2f001698e7463b04 (512 bits)
xprv     : xprv9s21ZrQH143K3h3fDYiay8mocZ3afhfULfb5GX8kCBdno77K4HiA15Tg23wpbeF1pLfs1c5SPmYHrEpTuuRhxMwvKDwqdKiGJS9XFKzUsAF

input    : 7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f (128 bits)
mnemonic : legal winner thank year wave sausage worth useful legal winner thank yellow (12 words)
seed     : 2e8905819b8723fe2c1d161860e5ee1830318dbf49a83bd451cfb8440c28bd6fa457fe1296106559a3c80937a1c1069be3a3a5bd381ee6260e8d9739fce1f607 (512 bits)
xprv     : xprv9s21ZrQH143K2gA81bYFHqU68xz1cX2APaSq5tt6MFSLeXnCKV1RVUJt9FWNTbrrryem4ZckN8k4Ls1H6nwdvDTvnV7zEXs2HgPezuVccsq

input    : 80808080808080808080808080808080 (128 bits)
mnemonic : letter advice cage absurd amount doctor acoustic avoid letter advice cage above (12 words)
seed     : d71de856f81a8acc65e6fc851a38d4d7ec216fd0796d0a6827a3ad6ed5511a30fa280f12eb2e47ed2ac03b5c462a0358d18d69fe4f985ec81778c1b370b652a8 (512 bits)
xprv     : xprv9s21ZrQH143K2shfP28KM3nr5Ap1SXjz8gc2rAqqMEynmjt6o1qboCDpxckqXavCwdnYds6yBHZGKHv7ef2eTXy461PXUjBFQg6PrwY4Gzq

input    : ffffffffffffffffffffffffffffffff (128 bits)
mnemonic : zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong (12 words)
seed     : ac27495480225222079d7be181583751e86f571027b0497b5b5d11218e0a8a13332572917f0f8e5a589620c6f15b11c61dee327651a14c34e18231052e48c069 (512 bits)
xprv     : xprv9s21ZrQH143K2V4oox4M8Zmhi2Fjx5XK4Lf7GKRvPSgydU3mjZuKGCTg7UPiBUD7ydVPvSLtg9hjp7MQTYsW67rZHAXeccqYqrsx8LcXnyd

seed 쫙 뽑히는걸 확인 할수 있다.

https://iancoleman.io/bip39/#korean  결과와 뽑혀진 seed를 비교 한다.

 

 

 

 

블로그 이미지

iesay

,

python secp256k1-py 오류

Django 2019. 7. 18. 12:31

출처 : https://github.com/ludbb/secp256k1-py 

 

Build software better, together

GitHub is where people build software. More than 36 million people use GitHub to discover, fork, and contribute to over 100 million projects.

github.com

apt-get install build-essential automake pkg-config libtool libffi-dev libgmp-dev

apt-get install python3.7-dev libmysqlclient-dev

 

명령어 두개만 추가 설치해주면 끝.

블로그 이미지

iesay

,

Oauth2 Django

Django 2019. 7. 11. 12:11

생각보다 개념이 없더라.

1] 사용자는 client_id 숫자와 redirect할 홈페이지를
get으로 서버에 날린다.

2] facebook서버는 일회용 token을 준다.

3] 사용자는 token과 일회용token과 secret_key를 함께 날린다.

1,2,3이 바바박 되면서 로그인이 된다.

client_id ,secret_key는 facebook서버에 가입해서 받는다.

 

 

 

 

블로그 이미지

iesay

,

django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')

 

 

python3 manage.py migrate에서 에러뜨는 경우

아래 처럼 바꾸면 됩니다.

 

MariaDB [(none)]> ALTER DATABASE `데이터베이스명` CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> exit

 

재실행하면 끝

 

 

'Django' 카테고리의 다른 글

Mnemonic code for generating deterministic keys, BIP39  (0) 2019.07.31
python secp256k1-py 오류  (0) 2019.07.18
Oauth2 Django  (0) 2019.07.11
블로그 이미지

iesay

,