updated to version 1.0.1 snapshot
added log in loading simmetric key git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/common-encryption@82339 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
605bd9cddf
commit
aa4d2e02a5
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-encryption</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<name>EncryptionLibrary</name>
|
||||
<description>A collection of Encryption utilities</description>
|
||||
<scm>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1 +1 @@
|
|||
&ル|lナ5イt`<60>絈jw
|
||||
< ャ@Qaj、F÷gク<67>
|
|
@ -0,0 +1 @@
|
|||
&ル|lナ5イt`<60>絈jw
|
Loading…
Reference in New Issue