Java String Encrypt encryptBytes(final byte[] b, final int i)

Here you can find the source of encryptBytes(final byte[] b, final int i)

Description

encrypt Bytes

License

Apache License

Declaration

public static byte[] encryptBytes(final byte[] b, final int i) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static byte[] encryptBytes(final byte[] b, final int i) {
        int startKey = i * 12345;
        int mulKey = startKey >>> 8;
        int addKey = startKey >>> 16;
        int j;/*from w  ww .j  a v  a2  s .  c  o m*/
        for (j = 0; j < b.length; j++) {
            b[j] = (byte) (b[j] ^ (startKey >>> 8));
            startKey = (b[j] + startKey) * mulKey + addKey;
        }
        return b;
    }
}

Related

  1. encrypt(String string)
  2. encrypt(String string)
  3. encrypt0(final byte[] result)
  4. encryptBankCardNo(String cardNo)
  5. encryptBankCardNoLast4Bits(String cardNo)
  6. encryptChar(String caracter, int variable, int indice)
  7. EncryptDecrypt(String value)
  8. encryptEmailId(String emailId)
  9. encryptIfNotEncrypted(String s)