PushUtils.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * Nextcloud Android client application
  3. *
  4. * @author Mario Danic
  5. * @author Chris Narkiewicz
  6. * Copyright (C) 2017 Mario Danic
  7. * Copyright (C) 2019 Chris Narkiewicz
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License as published by
  11. * the Free Software Foundation, either version 3 of the License, or
  12. * at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. package com.owncloud.android.utils;
  23. import android.content.Context;
  24. import com.nextcloud.client.account.UserAccountManager;
  25. import com.owncloud.android.MainApp;
  26. import com.owncloud.android.datamodel.SignatureVerification;
  27. import com.nextcloud.client.preferences.AppPreferencesImpl;
  28. import java.security.Key;
  29. public final class PushUtils {
  30. public static final String KEY_PUSH = "push";
  31. private PushUtils() {
  32. }
  33. public static void pushRegistrationToServer(
  34. final UserAccountManager accountManager,
  35. final String pushToken)
  36. {
  37. // do nothing
  38. }
  39. public static void reinitKeys(final UserAccountManager accountManager) {
  40. Context context = MainApp.getAppContext();
  41. AppPreferencesImpl.fromContext(context).setKeysReInitEnabled();
  42. }
  43. public static Key readKeyFromFile(boolean readPublicKey) {
  44. return null;
  45. }
  46. public static SignatureVerification verifySignature(
  47. final Context context,
  48. final UserAccountManager accountManager,
  49. final byte[] signatureBytes, final byte[] subjectBytes
  50. ) {
  51. return null;
  52. }
  53. }