projects
/
org.ibex.crypto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
89b8212
)
rsa bugs 2
author
brian
<brian@brianweb.net>
Fri, 4 Jun 2004 10:14:35 +0000
(10:14 +0000)
committer
brian
<brian@brianweb.net>
Fri, 4 Jun 2004 10:14:35 +0000
(10:14 +0000)
darcs-hash:
20040604101435
-24bed-
5ae52c3c0bcf19d509e7322234b18cd0977484d8
.gz
src/org/ibex/crypto/RSA.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/crypto/RSA.java
b/src/org/ibex/crypto/RSA.java
index
546d323
..
69a70b2
100644
(file)
--- a/
src/org/ibex/crypto/RSA.java
+++ b/
src/org/ibex/crypto/RSA.java
@@
-31,7
+31,7
@@
public class RSA {
if(reverse ? cbytes[0] == 0 : cbytes.length > outSize) {
if(cbytes[0] != 0) throw new RuntimeException("should never happen");
byte[] buf = new byte[cbytes.length-1];
- System.arraycopy(cbytes,1,buf,0,outSize);
+ System.arraycopy(cbytes,1,buf,0,buf.length);
return buf;
} else if(!reverse && cbytes.length < outSize) {
// output needs to be exactly outSize in length