NCKeyChainController.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import <Foundation/Foundation.h>
  6. #import "UICKeyChainStore.h"
  7. NS_ASSUME_NONNULL_BEGIN
  8. extern NSString * const kNCNormalPushTokenKey;
  9. extern NSString * const kNCPushKitTokenKey;
  10. @interface NCKeyChainController : NSObject
  11. @property (nonatomic, copy) UICKeyChainStore *keychain;
  12. + (instancetype)sharedInstance;
  13. - (void)setToken:(NSString *)token forAccountId:(NSString *)accountId;
  14. - (NSString *)tokenForAccountId:(NSString *)accountId;
  15. - (void)setPushNotificationPublicKey:(NSData *)privateKey forAccountId:(NSString *)accountId;
  16. - (NSData *)pushNotificationPublicKeyForAccountId:(NSString *)accountId;
  17. - (void)setPushNotificationPrivateKey:(NSData *)privateKey forAccountId:(NSString *)accountId;
  18. - (NSData *)pushNotificationPrivateKeyForAccountId:(NSString *)accountId;
  19. - (NSString *)pushTokenSHA512;
  20. - (void)logCombinedPushToken;
  21. - (NSString *)combinedPushToken;
  22. - (void)removeAllItems;
  23. @end
  24. NS_ASSUME_NONNULL_END