CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/crypto/rc4.rb
Views: 1904
1
# -*- coding: binary -*-
2
3
require 'rc4'
4
5
module Rex
6
module Crypto
7
module Rc4
8
9
# Returns a decrypted or encrypted RC4 string.
10
#
11
# @param key [String] Secret key.
12
# @param [String]
13
def self.rc4(key, value)
14
rc4 = RC4.new(key)
15
16
# This can also be used to decrypt
17
rc4.encrypt(value)
18
end
19
20
end
21
end
22
end
23
24