diff options
| author | mo <mo@mokhan.ca> | 2017-12-11 17:02:29 -0700 |
|---|---|---|
| committer | mo <mo@mokhan.ca> | 2017-12-11 17:02:29 -0700 |
| commit | 6fc27451cfd0d8b5b64df7eca80f3144674d5530 (patch) | |
| tree | 16cc1bfe742ff7a83c9b4df9fcaec486e0885ddd /lib | |
| parent | 4073768c9b52b2f7023c261010502a484a5e2ac5 (diff) | |
rename variable.v0.2.3
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/saml/kit/xml_decryption.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/saml/kit/xml_decryption.rb b/lib/saml/kit/xml_decryption.rb index 578148b..8bbe13c 100644 --- a/lib/saml/kit/xml_decryption.rb +++ b/lib/saml/kit/xml_decryption.rb @@ -8,10 +8,10 @@ module Saml end def decrypt(data) - encrypt_data = data['EncryptedData'] - symmetric_key = symmetric_key_from(encrypt_data) - cipher_text = Base64.decode64(encrypt_data["CipherData"]["CipherValue"]) - to_plaintext(cipher_text, symmetric_key, encrypt_data["EncryptionMethod"]['Algorithm']) + encrypted_data = data['EncryptedData'] + symmetric_key = symmetric_key_from(encrypted_data) + cipher_text = Base64.decode64(encrypted_data["CipherData"]["CipherValue"]) + to_plaintext(cipher_text, symmetric_key, encrypted_data["EncryptionMethod"]['Algorithm']) end private @@ -23,7 +23,7 @@ module Saml end def to_plaintext(cipher_text, symmetric_key, algorithm) - return Crypto.decryptor_for(algorithm, symmetric_key).decrypt(cipher_text) + Crypto.decryptor_for(algorithm, symmetric_key).decrypt(cipher_text) end end end |
