Java String Encrypt encrypt(int original, int salt)

Here you can find the source of encrypt(int original, int salt)

Description

encrypt some value with salt value by means of xor knowing that double xor with salt yields original value

License

Open Source License

Parameter

Parameter Description
original a parameter
salt a parameter

Declaration

public static int encrypt(int original, int salt) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  ww w  .j a va2s.c om
     * encrypt some value with salt value by means of xor knowing that double
     * xor with salt yields original value
     *
     * @param original
     * @param salt
     * @return
     */
    public static int encrypt(int original, int salt) {
        return original ^ salt;
    }
}

Related

  1. encrypt(byte[] data)
  2. encrypt(byte[] plaintextBytes, int r, int n)
  3. encrypt(byte[] serialize)
  4. encrypt(char ch)
  5. encrypt(String data, String key)
  6. encrypt(String inStr)
  7. encrypt(String s)
  8. encrypt(String s)