This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Syntax | |
module IntMap = Map.Make(struct type t = int let compare = compare end) | |
module List = struct | |
include List | |
let zip xs ys = | |
let rec go acc = function | |
| [], _ | _, [] -> List.rev acc | |
| x::xs, y::ys -> go ((x,y)::acc) (xs,ys) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IDObfuscation { | |
private static final char[] ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".toCharArray(); | |
private static final int BASE = ALPHABET.length; | |
private static final byte[] PADDING = {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17}; | |
private static final byte NEGATIVE = 0x2A; | |
private int key; | |
public IDObfuscation(int key) { | |
this.key = key; | |
} |