This commit is contained in:
Lucio Lelii 2016-02-22 16:38:00 +00:00
parent 8e26e518da
commit b501a005a8
1 changed files with 5 additions and 4 deletions

View File

@ -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));
}
}