Class: Interactsh::Crypto
- Inherits:
-
Object
- Object
- Interactsh::Crypto
- Defined in:
- lib/interactsh/crypto.rb
Overview
Cryptographic operations for Interactsh
Instance Method Summary collapse
-
#decrypt_data(aes_key, enc_data) ⇒ Hash
Decrypts interaction data using the provided AES key.
-
#initialize(rsa) ⇒ Crypto
constructor
A new instance of Crypto.
Constructor Details
#initialize(rsa) ⇒ Crypto
Returns a new instance of Crypto.
6 7 8 |
# File 'lib/interactsh/crypto.rb', line 6 def initialize(rsa) @rsa = rsa end |
Instance Method Details
#decrypt_data(aes_key, enc_data) ⇒ Hash
Decrypts interaction data using the provided AES key
15 16 17 18 19 20 |
# File 'lib/interactsh/crypto.rb', line 15 def decrypt_data(aes_key, enc_data) decrypted_aes_key = decrypt_aes_key(aes_key) decrypt_payload(decrypted_aes_key, enc_data) rescue StandardError => e raise DecryptionError, "Error decrypting data: #{e.}" end |