Package io.keyko.nevermined.api.impl
Class SecretStoreImpl
- java.lang.Object
-
- io.keyko.nevermined.api.impl.SecretStoreImpl
-
- All Implemented Interfaces:
SecretStoreAPI
public class SecretStoreImpl extends Object implements SecretStoreAPI
Implementation of SecretStoreAPI
-
-
Field Summary
Fields Modifier and Type Field Description private SecretStoreManagersecretStoreManager
-
Constructor Summary
Constructors Constructor Description SecretStoreImpl(SecretStoreManager secretStoreManager)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String documentId, String encryptedContent)Decrypts a document using Secret StoreStringencrypt(String documentId, String content, int threshold)Encrypts a document using Secret Store
-
-
-
Field Detail
-
secretStoreManager
private SecretStoreManager secretStoreManager
-
-
Constructor Detail
-
SecretStoreImpl
public SecretStoreImpl(SecretStoreManager secretStoreManager)
Constructor- Parameters:
secretStoreManager- the secretStore Manager
-
-
Method Detail
-
encrypt
public String encrypt(String documentId, String content, int threshold) throws EncryptionException
Description copied from interface:SecretStoreAPIEncrypts a document using Secret Store- Specified by:
encryptin interfaceSecretStoreAPI- Parameters:
documentId- the id of the documentcontent- the contentthreshold- secret store threshold- Returns:
- a String with the encrypted content
- Throws:
EncryptionException- EncryptionException
-
decrypt
public String decrypt(String documentId, String encryptedContent) throws EncryptionException
Description copied from interface:SecretStoreAPIDecrypts a document using Secret Store- Specified by:
decryptin interfaceSecretStoreAPI- Parameters:
documentId- the id of the documentencryptedContent- the encrypted content of the document- Returns:
- a String with the decrypted content
- Throws:
EncryptionException- EncryptionException
-
-