harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-78) SecurityKeySpec.getEncoded returns incorrect value
Date Mon, 27 Feb 2006 10:42:49 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-78?page=all ]
     
Tim Ellison closed HARMONY-78:
------------------------------


Verified by Mikhail

> SecurityKeySpec.getEncoded returns incorrect value
> --------------------------------------------------
>
>          Key: HARMONY-78
>          URL: http://issues.apache.org/jira/browse/HARMONY-78
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Mikhail Loenko
>     Assignee: Tim Ellison
>     Priority: Minor
>  Attachments: test.java
>
> Constructor
>    SecretKeySpec(byte[] key, int offset, int len, String alg)
> should create an instance of the class with key material of size 'len'.
> In fact it creates key material of size 'key.length'
> the patch:
> Index: modules/security2/src/common/javasrc/javax/crypto/spec/SecretKeySpec.java
> ===================================================================
> --- modules/security2/src/common/javasrc/javax/crypto/spec/SecretKeySpec.java	(revision
374613)
> +++ modules/security2/src/common/javasrc/javax/crypto/spec/SecretKeySpec.java	(working
copy)
> @@ -60,7 +60,7 @@
>              throw BADPARAMS_EXC;
>          }
>          this.algorithm = algorithm;
> -        this.key = new byte[key.length];
> +        this.key = new byte[len];
>          System.arraycopy(key, offset, this.key, 0, len);
>      }
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message