public long[] decode(String hash) {
        if (hash.isEmpty()) {
            return new long[0];
        }

        String validChars = this.alphabet + this.guards + this.seps;
        for (int i = 0; i < hash.length(); i++) {
            if (validChars.indexOf(hash.charAt(i)) == -1) {
                return new long[0];
            }
        }

        return this._decode(hash, this.alphabet);
    }
@Test
    public void test_issue45() throws Exception {
        Hashids hashids = new Hashids("this is my salt");
        long[]  numbers = hashids.decode("()");
        Assert.assertEquals(numbers.length, 0);
        numbers = hashids.decode("[]");
        Assert.assertEquals(numbers.length, 0);
        numbers = hashids.decode("недействительный");
        Assert.assertEquals(numbers.length, 0);
        numbers = hashids.decode("無效");
        Assert.assertEquals(numbers.length, 0);
    }