Module: Rex::Crypto

Defined in:
lib/rex/crypto.rb,
lib/rex/crypto/rc4.rb,
lib/rex/crypto/aes256.rb,
lib/rex/crypto/chacha20.rb

Defined Under Namespace

Modules: Aes256, Rc4 Classes: Chacha20

Class Method Summary collapse

Class Method Details

.decrypt_aes256(iv, key, value) ⇒ String

Deprecated.

Access via Rex::Crypto::Aes256

Returns a decrypted string using AES256-CBC.

Parameters:

  • iv (String)

    Initialization vector.

  • key (String)

    Secret key.

Returns:

  • (String)

    The decrypted string.



18
19
20
# File 'lib/rex/crypto.rb', line 18

def self.decrypt_aes256(iv, key, value)
  Aes256.decrypt_aes256(iv, key, value)
end

.encrypt_aes256(iv, key, value) ⇒ String

Deprecated.

Access via Rex::Crypto::Aes256

Returns an encrypted string using AES256-CBC.

Parameters:

  • iv (String)

    Initialization vector.

  • key (String)

    Secret key.

Returns:

  • (String)

    The encrypted string.



8
9
10
# File 'lib/rex/crypto.rb', line 8

def self.encrypt_aes256(iv, key, value)
  Aes256.encrypt_aes256(iv, key, value)
end

.rc4(key, value) ⇒ Object

Deprecated.

Access via Rex::Crypto::Rc4

Returns a decrypted or encrypted RC4 string.

Parameters:

  • key (String)

    Secret key.

  • (String)


27
28
29
# File 'lib/rex/crypto.rb', line 27

def self.rc4(key, value)
  Rc4.rc4(key, value)
end