git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/common-encryption@124442 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8e26e518da
commit
b501a005a8
|
@ -43,8 +43,8 @@ public class StringEncrypter implements IEncrypter<String>{
|
|||
* @return the encrypted string in a Base64 encoding
|
||||
* @throws Exception
|
||||
*/
|
||||
public String encrypt(String string, String keyFileName) throws Exception {
|
||||
return encrypt(string, SymmetricKey.getKeyByFile(keyFileName));
|
||||
public String encrypt(String string, String context) throws Exception {
|
||||
return encrypt(string, SymmetricKey.getKeyByFile(context));
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,9 +68,10 @@ public class StringEncrypter implements IEncrypter<String>{
|
|||
* @return the decripted string
|
||||
* * @throws Exception
|
||||
*/
|
||||
public String decrypt(String string, String keyFileName) throws Exception {
|
||||
return decrypt(string, SymmetricKey.getKeyByFile(keyFileName));
|
||||
public String decrypt(String string, String context) throws Exception {
|
||||
return decrypt(string, SymmetricKey.getKeyByFile(context));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue