Changeset 1500
- Timestamp:
- 07/09/06 15:01:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/python/Tests/xmlsec/WS-Security/wsSecurity.py
r1491 r1500 399 399 # Extract RSA public key from the cert 400 400 rsaPubKey = x509Cert.get_pubkey().get_rsa() 401 401 402 402 data = "The Larch" 403 padding = ''.join([' ']*7)404 data += padding405 403 encryptedData = rsaPubKey.public_encrypt(data, RSA.pkcs1_padding) 406 404 … … 416 414 callback=lambda *ar, **kw: self.__priKeyPwd) 417 415 418 padding = ''.join([' ']*7)419 decryptedData = priKey.private_decrypt(encryptedData,padding)416 decryptedData = priKey.private_decrypt(encryptedData, 417 RSA.pkcs1_padding) 420 418 421 419 print decryptedData … … 430 428 priKeyPwd=open('../../tmp2').read().strip()) 431 429 432 print e.decrypt(e.encrypt(None)) 430 encryptedData = e.encrypt(None) 431 print e.decrypt(None, encryptedData) 433 432
Note: See TracChangeset
for help on using the changeset viewer.