Java Utililty Methods String Encrypt

List of utility methods to do String Encrypt

Description

The list of methods to do String Encrypt are organized into topic(s).

Method

Stringencrypt(byte[] data)
encrypt
StringBuffer sb = new StringBuffer();
int len = data.length;
int i = 0;
int b1, b2, b3;
while (i < len) {
    b1 = data[i++] & 0xff;
    if (i == len) {
        sb.append(base64EncodeChars[b1 >>> 2]);
...
byte[]encrypt(byte[] plaintextBytes, int r, int n)
encrypt
byte[] buffer = new byte[plaintextBytes.length + n];
for (int i = 0; i < n; i++) {
    buffer[i] = 0;
System.arraycopy(plaintextBytes, 0, buffer, n, buffer.length - n);
int c1 = 52845;
int c2 = 22719;
byte[] ciphertextBytes = new byte[buffer.length];
...
byte[]encrypt(byte[] serialize)
encrypt
for (int i = 0; i < serialize.length; i++) {
    serialize[i] = (byte) (serialize[i] ^ 3629);
return serialize;
charencrypt(char ch)
encrypt
for (int i = 0; i < table.length; i++) {
    if (table[i][0] == ch) {
        return table[i][1];
return ch;
intencrypt(int original, int salt)
encrypt some value with salt value by means of xor knowing that double xor with salt yields original value
return original ^ salt;
byte[]encrypt(String data, String key)
encrypt
return encrypt(data.getBytes(), key.getBytes());
Stringencrypt(String inStr)
encrypt
char[] a = inStr.toCharArray();
for (int i = 0; i < a.length; i++) {
    a[i] = (char) (a[i] ^ 't');
String s = new String(a);
return s;
Stringencrypt(String s)
encrypt
s = ENCRYPTED_PREFIX + s + ENCRYPTED_SUFFIX;
StringBuilder rtn = new StringBuilder(s.length());
byte[] bytes = s.getBytes();
for (int i = 0; i < bytes.length; i++) {
    rtn.append(encrypt(bytes[i], KEY[i % KEY.length]));
return rtn.toString();
Stringencrypt(String s)
encrypt
String n = "";
int l = s.length();
for (int i = 0; i < l; i++) {
    char c = s.charAt(i);
    int t = (int) c;
    t = t ^ l;
    c = (char) (t);
    n += c;
...
StringEncrypt(String str)
Encrypt
return Str2Unicode(encryStr("IBMExtract", str));