3
我期待在蘋果文檔的存摺,我需要:使用pycrypto PKCS#7創建簽名
- 創建一個「清單文件的PKCS#7分離簽名」。
我理想上喜歡用Python做這個,我最好喜歡用pycrypto來完成這個任務,麻煩的是,我在網上找不到任何示例代碼來說明如何做到這一點,有很多這樣的代碼:
from Crypto.Cipher import PKCS1_v1_5
from Crypto.PublicKey import RSA
from Crypto.Hash import SHA
message = 'To be encrypted'
h = SHA.new(message)
key = RSA.importKey(open('pubkey.der').read())
cipher = PKCS1_v1_5.new(key)
ciphertext = cipher.encrypt(message+h.digest())
,但不知道有關的PKCS#7,我不知道我需要做的細節不夠......
有沒有人有什麼想法?
感謝
由於這已經有幾年了,你有沒有找到解決方案? – WhyNotHugo 2015-08-15 00:04:50