Quantcast
Channel: Tópicos
Viewing all articles
Browse latest Browse all 11336

Utilizar Webservices da AT

$
0
0
Olá Ricardo Eu tenho a funcionar em Python desde o inicio Eu fiz assim: from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 from Crypto.Protocol.KDF import PBKDF2 from base64 import b64encode, b64decode (...) #### RSA ##### # com a ChavePublicaAT.cer # openssl x509 -inform pem -in ChavePublicaAT.cer -pubkey -noout > pubatcrt.pem # tmp=open('data/pubatcrt.pem','r') chave=RSA.importKey(tmp.read()) tmp.close() encriptar=PKCS1_v1_5.new(chave) nonce=encriptar.encrypt(simetrica) bnonce=b64encode(nonce) (...) Espero ter ajudado

Viewing all articles
Browse latest Browse all 11336

Trending Articles