CloudKeyStorage
@objc(VSSCloudKeyStorage)
open class CloudKeyStorage : NSObject
extension CloudKeyStorage: CloudKeyStorageProtocol
                Class responsible for storing Keys in Cloud using E2EE
- 
                  
                  
KeyknoxManager
Declaration
Swift
@objc public let keyknoxManager: KeyknoxManager - 
                  
                  
Public keys used for encryption and signature verification
Declaration
Swift
@objc public internal(set) var publicKeys: [VirgilPublicKey] { get } - 
                  
                  
Private key used for decryption and signing
Declaration
Swift
@objc public internal(set) var privateKey: VirgilPrivateKey { get } - 
                  
                  
Undocumented
Declaration
Swift
@objc public static let root: String - 
                  
                  
Undocumented
Declaration
Swift
@objc public static let path: String - 
                  
                  
Undocumented
Declaration
Swift
@objc public static let key: String - 
                  
                  
Shows whether this storage was synced
Declaration
Swift
@objc public var storageWasSynced: Bool { get } - 
                  
                  
Init
Declaration
Swift
@objc public init(keyknoxManager: KeyknoxManager, publicKeys: [VirgilPublicKey], privateKey: VirgilPrivateKey)Parameters
keyknoxManagerKeyknoxManager
 - 
                  
                  
Init
Throws
Rethrows fromKeyknoxManagerDeclaration
Swift
@objc public convenience init(accessTokenProvider: AccessTokenProvider, crypto: VirgilCrypto, publicKeys: [VirgilPublicKey], privateKey: VirgilPrivateKey) throwsParameters
accessTokenProviderAccessTokenProvider implementation
cryptoCrypto
publicKeysPublic keys used for encryption and signature verification
privateKeyPrivate key used for decryption and signature verification
 
- 
                  
                  
Retrieves entries from Cloud
Declaration
Swift
@objc open func retrieveCloudEntries(completion: @escaping (Error?) -> Void)Parameters
completionCompletion handler
 - 
                  
                  
Stores entries to cloud
Declaration
Swift
@objc open func storeEntries(_ keyEntries: [KeyknoxKeyEntry], completion: @escaping (Error?) -> Void)Parameters
keyEntriesEntries to store
completionCompletion handler
 - 
                  
                  
Checks if entry exists in list of loaded from Cloud entries
Declaration
Swift
@objc open func existsEntryNoThrow(withName name: String) -> BoolParameters
nameEntry name
Return Value
true if entry exists, false - otherwise
 - 
                  
                  
Stores entry to cloud
Declaration
Swift
@objc open func storeEntry(withName name: String, data: Data, meta: [String: String]? = nil, completion: @escaping (Error?) -> Void)Parameters
nameName
dataData
metaMeta
completionCompletion handler
 - 
                  
                  
Deletes entry from Cloud
Declaration
Swift
@objc open func deleteEntry(withName name: String, completion: @escaping (Error?) -> Void)Parameters
nameEntry name
completionCompletion handler
 - 
                  
                  
Deletes entries from Cloud
Declaration
Swift
@objc open func deleteEntries(withNames names: [String], completion: @escaping (Error?) -> Void)Parameters
namesNames of entries to delete
completionCompletion handler
 - 
                  
                  
Deletes all entries from Cloud
Declaration
Swift
@objc open func deleteAllEntries(completion: @escaping (Error?) -> Void)Parameters
completionCompletion handler
 - 
                  
                  
Updates entry in Cloud
Declaration
Swift
@objc open func updateEntry(withName name: String, data: Data, meta: [String: String]? = nil, completion: @escaping (CloudEntry?, Error?) -> Void)Parameters
nameName
dataNew data
metaNew meta
completionCompletion handler
 - 
                  
                  
Updated recipients. See KeyknoxManager.updateRecipients
Declaration
Swift
@objc open func updateRecipients(newPublicKeys: [VirgilPublicKey]? = nil, newPrivateKey: VirgilPrivateKey? = nil, completion: @escaping (Error?) -> Void)Parameters
newPublicKeysNew public keys
newPrivateKeyNew private key
completionCompletion handler
 - 
                  
                  
Stores entries to cloud
Declaration
Swift
public func storeEntries(_ keyEntries: [KeyknoxKeyEntry]) -> GenericOperation<[CloudEntry]>Parameters
keyEntriesEntries to store
Return Value
GenericOperation<[CloudEntry]>
 - 
                  
                  
Stores entry to cloud
Declaration
Swift
public func storeEntry(withName name: String, data: Data, meta: [String: String]? = nil) -> GenericOperation<CloudEntry>Parameters
nameName
dataData
metaMeta
Return Value
GenericOperation
 - 
                  
                  
Updates entry in Cloud
Declaration
Swift
public func updateEntry(withName name: String, data: Data, meta: [String: String]? = nil) -> GenericOperation<CloudEntry>Parameters
nameName
dataNew data
metaNew meta
Return Value
GenericOperation
 - 
                  
                  
Retrieves entry loaded from Cloud
Throws
CloudKeyStorageError.cloudStorageOutOfSyncDeclaration
Swift
@objc open func retrieveEntry(withName name: String) throws -> CloudEntryParameters
nameName
Return Value
Entry
 - 
                  
                  
Returns all entries loaded from Cloud
Throws
CloudKeyStorageError.cloudStorageOutOfSync if storage was not syncedDeclaration
Swift
@objc open func retrieveAllEntries() throws -> [CloudEntry]Return Value
All entries
 - 
                  
                  
Checks if entry exists in list of loaded from Cloud entries
Throws
CloudKeyStorageError.cloudStorageOutOfSync if storage was not syncedDeclaration
Swift
public func existsEntry(withName name: String) throws -> BoolParameters
nameEntry name
Return Value
true if entry exists, false - otherwise
 - 
                  
                  
Deletes entry from Cloud
Declaration
Swift
public func deleteEntry(withName name: String) -> GenericOperation<Void>Parameters
nameEntry name
Return Value
GenericOperation
 - 
                  
                  
Deletes entries from Cloud
Declaration
Swift
public func deleteEntries(withNames names: [String]) -> GenericOperation<Void>Parameters
namesNames of entries to delete
Return Value
GenericOperation
 - 
                  
                  
Deletes all entries from Cloud
Declaration
Swift
public func deleteAllEntries() -> GenericOperation<Void>Return Value
GenericOperation
 - 
                  
                  
Updates recipients. See KeyknoxManager.updateRecipients
Declaration
Swift
public func updateRecipients(newPublicKeys: [VirgilPublicKey]? = nil, newPrivateKey: VirgilPrivateKey? = nil) -> GenericOperation<Void>Parameters
newPublicKeysNew public keys
newPrivateKeyNew private key
Return Value
GenericOperation
 - 
                  
                  
Retrieves entries from Cloud
Declaration
Swift
public func retrieveCloudEntries() -> GenericOperation<Void>Return Value
GenericOperation
 
        CloudKeyStorage Class Reference