public static int charToInt(char ch) {
			if ('0' <= ch && ch <= '9') {
				return (ch - '0');
			} else if ('a' <= ch && ch <= 'f') {
				return (ch - 'a') + 10;
			} else if ('A' <= ch && ch <= 'F') {
				return (ch - 'A') + 10;
			} else {
				throw new NumberFormatException("not a sha-1 string");
			}
		}