private int hash(String secret, long interval) {
byte[] hash = new byte[0];
try {
//Base32 encoding is just a requirement for google authenticator. We can remove it on the next releases.
hash = new Hmac(Hash.SHA1, Base32.decode(secret), interval).digest();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (Base32.DecodingException e) {