diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-01 12:18:52 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-01 12:18:52 (GMT) |
commit | 2169d8cd423c399ceb53e962ad5313e3c28d2297 (patch) | |
tree | c581d1ba8b15509c15a8fadfbc2090c915aec1ad /src/com/isode/stroke/stringcodecs/HMACSHA1.java | |
parent | 2da71a8a85486a494343f1662d64fb5ae5a2a44e (diff) | |
download | stroke-2169d8cd423c399ceb53e962ad5313e3c28d2297.zip stroke-2169d8cd423c399ceb53e962ad5313e3c28d2297.tar.bz2 |
Update the ByteArray to not copy excessively on appends.
Also updates build.xml so the path to the xpp library can be specified,
rather than needing the same layout as my build tree.
Diffstat (limited to 'src/com/isode/stroke/stringcodecs/HMACSHA1.java')
-rw-r--r-- | src/com/isode/stroke/stringcodecs/HMACSHA1.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/isode/stroke/stringcodecs/HMACSHA1.java b/src/com/isode/stroke/stringcodecs/HMACSHA1.java index 1d8c9b7..8d3f5c5 100644 --- a/src/com/isode/stroke/stringcodecs/HMACSHA1.java +++ b/src/com/isode/stroke/stringcodecs/HMACSHA1.java @@ -34,6 +34,7 @@ public class HMACSHA1 { for (int i = 0; i < xInner.length; ++i) { xInner[i] ^= 0x36; } + x = new ByteArray(xInner); x.append(data); // Create the second value @@ -42,6 +43,7 @@ public class HMACSHA1 { for (int i = 0; i < yInner.length; ++i) { yInner[i] ^= 0x5c; } + y = new ByteArray(yInner); y.append(SHA1.getHash(x)); return SHA1.getHash(y); |