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:
Roberto Cirillo 2013-10-03 08:19:28 +00:00
parent 605bd9cddf
commit aa4d2e02a5
4 changed files with 8 additions and 5 deletions

View File

@ -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>

View File

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

View File

@ -1 +1 @@
&ル|€lナ5イt`<60>絈jw
< ャ@Qaj、F÷gク<67>

View File

@ -0,0 +1 @@
&ル|€lナ5イt`<60>絈jw