using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BitcoinLibrary
{
/**
* A BitCoin address is fundamentally derived from an elliptic curve public key and a set of network parameters.
* It has several possible representations:
*
*
* - The raw public key bytes themselves.
* - RIPEMD160 hash of the public key bytes.
* - A ba
se58 encoded “human form“ that includes a version and check code to guard against typos.
*
*
* One may question whether the base58 form is really an improvement over the hash160 form given
* they are both very unfriendly for typists. More useful representations might include qrcodes
* and identicons.
*
* Note that an address is specific to a network because the first byte is a discriminator value.
*/
public class Address : VersionedChecksummedBytes
{
/**
* Construct an address from parameters and the hash160 form. Example:
*
*
new Address(NetworkParameters.prodNet() Hex.decode(“4a22c3c4cbb31e4d03b15550636762bda0baf85a“));
*/
public Address(NetworkParameters param byte[] hash160)
: base(param.addressHeader hash160)
{
if (hash160.Length != 20) // 160 = 8 * 20
throw new Exception(“Addresses are 160-bit hashes so you must provide 20 bytes“);
}
/**
* Construct an address from parameters and the standard “human readable“ form. Example:
*
*
new Address(NetworkParameters.prodNet() “17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL“);
*/
public Address(NetworkParameters param String address)
: base(address)
{
if (version != param.addressHeader)
throw new Exception(“Mismatched version number trying to cross networks? “ + version +
“ vs “ + param.addressHeader);
}
/** The (big endian) 20 byte hash that is the core of a BitCoin address. */
public byte[] getHash160()
{
return bytes;
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 2978 2013-05-14 16:27 bitcoincs-20228BitcoinCS.sln
..A..H. 39936 2013-05-14 18:02 bitcoincs-20228BitcoinCS.suo
....... 2292 2013-05-14 16:27 bitcoincs-20228BitcoinLibraryAddress.cs
....... 1654 2013-05-14 16:27 bitcoincs-20228BitcoinLibraryAddressMessage.cs
....... 4889 2013-05-14 16:27 bitcoincs-20228BitcoinLibrarya
....... 5004 2013-05-14 16:27 bitcoincs-20228BitcoinLibraryBigInteger.cs
文件 146432 2011-09-30 09:33 bitcoincs-20228BitcoinLibraryinDebugAga.Controls.dll
文件 1357 2011-09-30 09:58 bitcoincs-20228BitcoinLibraryinDebugAga.Controls.License.txt
文件 101888 2013-05-14 16:29 bitcoincs-20228BitcoinLibraryinDebugBitcoinLibrary.dll
文件 323072 2013-05-14 16:29 bitcoincs-20228BitcoinLibraryinDebugBitcoinLibrary.pdb
文件 607 2013-05-16 17:13 bitcoincs-20228BitcoinLibraryinDebugGPUTemp.config
文件 1052160 2013-05-13 18:12 bitcoincs-20228BitcoinLibraryinDebugGPUTemp.exe
文件 226857 2011-09-30 15:06 bitcoincs-20228BitcoinLibraryinDebugicon.ico
文件 26225 2011-09-30 09:58 bitcoincs-20228BitcoinLibraryinDebugOpenHardwareMonitor.License.txt
文件 575 2011-09-30 09:59 bitcoincs-20228BitcoinLibraryinDebugResourcesapp.manifest
文件 937 2011-09-30 09:59 bitcoincs-20228BitcoinLibraryinDebugResourcesati.png
文件 440 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcesarback.png
文件 571 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcesarblue.png
文件 702 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcesigng.png
文件 852 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourceschip.png
文件 354 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcesclock.png
文件 576 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcescomputer.png
文件 814 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcescontrol.png
文件 611 2011-09-30 10:00 bitcoincs-20228BitcoinLibraryinDebugResourcescpu.png
文件 1107 2011-09-30 10:01 bitcoincs-20228BitcoinLibraryinDebugResourcesfan.png
文件 857 2011-09-30 10:01 bitcoincs-20228BitcoinLibraryinDebugResourcesflow.png
文件 5969 2011-09-30 10:01 bitcoincs-20228BitcoinLibraryinDebugResourcesgadget.png
文件 91414 2011-09-30 10:01 bitcoincs-20228BitcoinLibraryinDebugResourcesgadget.xcf
文件 3456 2011-09-30 15:27 bitcoincs-20228BitcoinLibraryinDebugResourcesgpu.jpg
文件 649 2011-09-30 10:01 bitcoincs-20228BitcoinLibraryinDebugResourceshdd.png
............此处省略128个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)