Beispiel #1
0
import k2rsa
import k2kmdfile

k2rsa.create_key('key.pkr', 'key.skr')

ret = k2kmdfile.make('kicom.lst')
if ret:
    pu = k2rsa.read_key('key.pkr')
    k = k2kmdfile.KMD('kicom.kmd', pu)
    print k.body
Beispiel #2
0
# -*- coding: utf-8 -*-
"""
Created on Tue May 19 19:31:52 2020

@author: ghdhf
"""

import sys
import k2rsa

if __name__ == '__main__':
    pu_fname = 'key.pkr'
    pr_fname = 'key.skr'

    if len(sys.argv) == 3:
        pu_fname = sys.argv[1]
        pr_fname = sys.argv[2]
    elif len(sys.argv) != 1:
        print("Usage : mkkey.py [[PU filename] [PR filename]]")
        exit(0)

    k2rsa.create_key(pu_fname, pr_fname, True)  #공개키와 개인키를 생성한다.
Beispiel #3
0
# -*- coding: utf-8 -*-
"""
Created on Mon May 25 07:48:18 2020

@author: ghdhf
KMD 파일 생성 및 복호화 모듈 테스트
"""

import k2rsa
import k2kmdfile

k2rsa.create_key('key.pkr', 'key.skr', True)

#이부분이 에러..
ret = k2kmdfile.make('readme.txt')
if ret:
    pu = k2rsa.read_key('key.pkr')
    k = k2kmdfile.KMD('readme.kmd', pu)
    print(k.body)
Beispiel #4
0
import sys
import k2rsa

if __name__ == '__main__':
    pu_fname = 'key.pkr'
    pr_fname = 'key.skr'

    if len(sys.argv) == 3:
        pu_fname = sys.argv[1]
        pr_fname = sys.argv[2]

    elif len(sys.argv) != 1:
        print 'Usage: mkkey.py [[PU filename] [PR filename]]'
        exit(0)

    k2rsa.create_key(pu_fname, pr_fname, True)