lib/sepa/banks/danske/danske_response.rb
# Decrypts (assymetrically) the symmetric encryption key embedded in the response with the
# private key given to the response in the parameters. The key is later used to decrypt the
# application response.
#
# @return [String] the encryption key as a string
# @return [nil] if the key cannot be decrypted with the given key
Decrypts (assymetrically) the symmetric encryption key embedded in the response with the
private key given to the response in the parameters. The key is later used to decrypt the
application response.
Decrypts ( assymetrically ) the symmetric encryption key embedded in the response with the private key given to the response in the parameters . The key is later used to decrypt the application response .
def decrypt_embedded_key
        enc_key = encrypted_application_response.css('CipherValue', 'xmlns' => XMLENC)[0].content
        enc_key = decode enc_key
        @encryption_private_key.private_decrypt(enc_key)
      rescue OpenSSL::PKey::RSAError
        nil
      end
def decrypt_embedded_key enc_key = encrypted_application_response . css ( 'CipherValue' , 'xmlns' => XMLENC ) [ 0 ] . content enc_key = decode enc_key @encryption_private_key . private_decrypt ( enc_key ) rescue OpenSSL :: PKey :: RSAError nil end
Decrypts (assymetrically) the symmetric encryption key embedded in the response with the
private key given to the response in the parameters.
Decrypts ( assymetrically ) the symmetric encryption key embedded in the response with the private key given to the response in the parameters .
the encryption key as a string
the encryption key as a string
String
if the key cannot be decrypted with the given key
if the key cannot be decrypted with the given key
nil