git://git.novaco.in
/
NovacoinLibrary.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
5f1c284
)
Use GetDigestSize()
author
CryptoManiac
<balthazar@yandex.ru>
Sun, 23 Aug 2015 21:14:58 +0000 (
00:14
+0300)
committer
CryptoManiac
<balthazar@yandex.ru>
Sun, 23 Aug 2015 21:14:58 +0000 (
00:14
+0300)
Novacoin/Hash160.cs
patch
|
blob
|
history
diff --git
a/Novacoin/Hash160.cs
b/Novacoin/Hash160.cs
index
df73f99
..
f95165b
100644
(file)
--- a/
Novacoin/Hash160.cs
+++ b/
Novacoin/Hash160.cs
@@
-48,8
+48,8
@@
namespace Novacoin
{
var dataBytes = inputBytes.ToArray();
- var digest1 = new byte[32];
- var digest2 = new byte[20];
+ var digest1 = new byte[_hasher256.GetDigestSize()];
+ var digest2 = new byte[_hasher160.GetDigestSize()];
_hasher256.BlockUpdate(dataBytes, 0, dataBytes.Length);
_hasher256.DoFinal(digest1, 0);