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/rc4.rb
Views: 11779
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