Package com.uc4.util
Class RC4
- java.lang.Object
-
- com.uc4.util.RC4
-
public class RC4 extends java.lang.Object
Encryption class using RC4 cipher
-
-
Constructor Summary
Constructors Constructor Description RC4()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
decode(java.lang.String encrypted, ConnectionAttributes connectionAttributes)
Decodes the passed string with the RC4 cipher using a key created from connection attributesstatic java.lang.String
encode(java.lang.String orig)
Encodes the passed string with the RC4 cipher using the default keystatic java.lang.String
encode(java.lang.String orig, ConnectionAttributes connectionAttributes)
Encodes the passed string with the RC4 cipher using a key created from connection attributesstatic java.lang.String
fillString(java.lang.String s, char indent, int len)
fills a string with the given char to the given length
-
-
-
Method Detail
-
fillString
public static java.lang.String fillString(java.lang.String s, char indent, int len)
fills a string with the given char to the given length
-
encode
public static java.lang.String encode(java.lang.String orig)
Encodes the passed string with the RC4 cipher using the default key- Parameters:
orig
- string to be encrypted- Returns:
- the encoded string
-
encode
public static java.lang.String encode(java.lang.String orig, ConnectionAttributes connectionAttributes)
Encodes the passed string with the RC4 cipher using a key created from connection attributes- Parameters:
orig
- string to be encryptedconnectionAttributes
- the connection attributes to use for creating the key- Returns:
- the encoded string
-
decode
public static java.lang.String decode(java.lang.String encrypted, ConnectionAttributes connectionAttributes)
Decodes the passed string with the RC4 cipher using a key created from connection attributes- Parameters:
orig
- string to be decryptedconnectionAttributes
- the connection attributes to use for creating the key- Returns:
- the decoded string
-
-