C# Class Paymetheus.Bitcoin.Wallet.Checksum

Show file Open project: btcsuite/Paymetheus

Public Methods

Method Description
Verify ( byte value ) : bool

Verifies the value ends with 4 bytes of a matching checksum.

WriteSum ( byte buffer ) : void

Computes the checksum for all but the last 4 bytes of the buffer and writes the sum to the final 4 bytes.

Private Methods

Method Description
Hash ( byte value ) : byte[]

Method Details

Verify() public static method

Verifies the value ends with 4 bytes of a matching checksum.
public static Verify ( byte value ) : bool
value byte Byte array containing value to check, followed by 4 bytes of checksum
return bool

WriteSum() public static method

Computes the checksum for all but the last 4 bytes of the buffer and writes the sum to the final 4 bytes.
public static WriteSum ( byte buffer ) : void
buffer byte Buffer containing value to sum, followed by 4 bytes to place checksum
return void