PushUtils.java 1.9 KB

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