diff --git a/pom.xml b/pom.xml
index 1c14261..41bfbd1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
org.gcube.core
common-encryption
- 1.0.0-SNAPSHOT
+ 1.0.1-SNAPSHOT
EncryptionLibrary
A collection of Encryption utilities
diff --git a/src/main/java/org/gcube/common/encryption/SymmetricKey.java b/src/main/java/org/gcube/common/encryption/SymmetricKey.java
index 4ff89b8..297e143 100644
--- a/src/main/java/org/gcube/common/encryption/SymmetricKey.java
+++ b/src/main/java/org/gcube/common/encryption/SymmetricKey.java
@@ -41,13 +41,15 @@ final class SymmetricKey {
*/
private static void load() throws InvalidKeyException {
byte[] rawKey;
+ String keyFileName=null;
try {
- InputStream is =SymmetricKey.class.getResourceAsStream("/"+getKeyFileName());
+ keyFileName=getKeyFileName();
+ InputStream is =SymmetricKey.class.getResourceAsStream("/"+keyFileName);
rawKey = getBytesFromStream(is);
} catch (Exception e) {
- System.out.println("Unable to load the Key from the classpath");
+ System.out.println("Unable to load the Key "+keyFileName+" from the classpath");
e.printStackTrace();
- throw new InvalidKeyException();
+ throw new InvalidKeyException("Unable to load the Key "+keyFileName+" from the classpath");
}
try {
key = new SecretKeySpec(rawKey, 0, rawKey.length, keyAlgorithm);
diff --git a/src/test/resources/devsec.gcubekey b/src/test/resources/devsec.gcubekey
index cd412c6..b113201 100644
--- a/src/test/resources/devsec.gcubekey
+++ b/src/test/resources/devsec.gcubekey
@@ -1 +1 @@
- &Ù|€lÅ5²t`ÿûŠjw
\ No newline at end of file
+< ¬@Qaj¤F€g¸ðQ
\ No newline at end of file
diff --git a/src/test/resources/devsec.gcubekeyLocale b/src/test/resources/devsec.gcubekeyLocale
new file mode 100644
index 0000000..cd412c6
--- /dev/null
+++ b/src/test/resources/devsec.gcubekeyLocale
@@ -0,0 +1 @@
+ &Ù|€lÅ5²t`ÿûŠjw
\ No newline at end of file