CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/crypto.rb
Views: 11766
1
module Rex::Crypto
2
# Returns an encrypted string using AES256-CBC.
3
#
4
# @deprecated Access via Rex::Crypto::Aes256
5
# @param iv [String] Initialization vector.
6
# @param key [String] Secret key.
7
# @return [String] The encrypted string.
8
def self.encrypt_aes256(iv, key, value)
9
Aes256.encrypt_aes256(iv, key, value)
10
end
11
12
# Returns a decrypted string using AES256-CBC.
13
#
14
# @deprecated Access via Rex::Crypto::Aes256
15
# @param iv [String] Initialization vector.
16
# @param key [String] Secret key.
17
# @return [String] The decrypted string.
18
def self.decrypt_aes256(iv, key, value)
19
Aes256.decrypt_aes256(iv, key, value)
20
end
21
22
# Returns a decrypted or encrypted RC4 string.
23
#
24
# @deprecated Access via Rex::Crypto::Rc4
25
# @param key [String] Secret key.
26
# @param [String]
27
def self.rc4(key, value)
28
Rc4.rc4(key, value)
29
end
30
end
31
32