public static Signer getSigningOracle(String secret) {
    try {
      byte[] keyBytes = decodeKey(secret);
      final Mac mac = Mac.getInstance("HMACSHA1");
      mac.init(new SecretKeySpec(keyBytes, ""));

      // Create a signer object out of the standard Java MAC implementation.
      return new Signer() {
        @Override
        public byte[] sign(byte[] data) {
          return mac.doFinal(data);
        }
      };
    } catch (DecodingException
        | NoSuchAlgorithmException
        | InvalidKeyException
        | IllegalArgumentException error) {
      Log.e(LOCAL_TAG, error.getMessage());
    }

    return null;
  }
@return whether the database appears to be consistent with expectations or not
java/com/google/android/apps/authenticator/otp/AccountDb.java