KeyknoxCryptoProtocol
public protocol KeyknoxCryptoProtocol : AnyObject
Protocol with crypto operations needed for Keyknox
-
Decrypts EncryptedKeyknoxValue
Throws
Depends on implementationDeclaration
Swift
func decrypt(encryptedKeyknoxValue: EncryptedKeyknoxValue, privateKey: VirgilPrivateKey, publicKeys: [VirgilPublicKey]) throws -> DecryptedKeyknoxValueParameters
encryptedKeyknoxValueencrypted value from Keyknox service
privateKeyprivate key to decrypt data
publicKeysallowed public keys to verify signature
Return Value
DecryptedKeyknoxValue
-
Encrypts data for Keyknox
Throws
Depends on implementationDeclaration
Swift
func encrypt(data: Data, privateKey: VirgilPrivateKey, publicKeys: [VirgilPublicKey]) throws -> (Data, Data)Parameters
dataData to encrypt
privateKeyPrivate key to sign data
publicKeysPublic keys to encrypt data
Return Value
Meta information and encrypted blob
KeyknoxCryptoProtocol Protocol Reference