EncryptClient class

Constructors

EncryptClient(Map authData, String webId)

Properties

accessToken ↔ dynamic
getter/setter pair
authData Map
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
publicKeyJwk ↔ dynamic
getter/setter pair
rsaInfo ↔ dynamic
getter/setter pair
rsaKeyPair ↔ dynamic
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
webId String
getter/setter pair

Methods

checkEncKeyStorage() bool
Check if encryption key is already stored in the local storage
checkEncSetup() Future<bool>
Check if an encryption key is setup
createItem(bool fileFlag, String itemName, String itemBody, {String? fileLoc}) Future<String>
Create a directory or a file
decryptFile(String filePath, String fileName) Future<void>
Decrypt a file content The function takes ciphertext in an encrypted file, decrypt them using the key, and store the plaintext in the same file
decryptVal(String encKey, String encVal, String ivVal) String
Decrypt a ciphertext value
deleteItem(bool fileFlag, String itemLoc) Future<String>
Delete a file or a directory
encryptFile(String filePath, String fileName) Future<void>
Encrypt a file content The function takes all the content in a file and encrypt them using the key and store the ciphertext in the same file
encryptVal(String encKey, String plaintextVal) List
Encrypt a plaintext value
fetchFile(String fileLoc) Future<String>
Get a file content from the server
getEncFileList() Future<List>
getEncKeyStorage() String
Get encryption key
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEncKeyStorage() → void
Remove encryption key from the local storage
revokeEnc(String plainPrevEncKey) Future<String>
Revoke the encryption. All the encrypted files will be rewritten with their respective plaintext and the encryption key hashes will be deleted from the server.
runQuery(String queryUrl, String dPopToken, String query) Future<String>
Run a sparql query
setEncKeyStorage(String encKey) → void
Store the encryption key in the local storage
setupEncKey(String plainEncKey) Future<String>
Set up encryption key by creating a directory and a ttl file to store the key
toString() String
A string representation of this object.
inherited
updateEncKey(String plainPrevEncKey, String plainNewEncKey) Future<String>
Update/change encryption key Need to re-encrypt all the encrypted files using the new key
verifyEncKey(String plaintextEncKey) Future<bool>
Encryption key verification with the hash value stored in the server

Operators

operator ==(Object other) bool
The equality operator.
inherited