C# Класс Secp256k1.VarStringExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
GetVarString ( this str ) : byte[]

Extension Method for string type Returns a byte array with string length as a VarInt followed by string contents Is a Bitcoin Protocol specific structure https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_string Limitation: The Bitcoin protocol supports string up to 2^64 -1 (unit64) bytes in length. The C# built in type "string" only supports strings up to 2^31-1 (singed int32) bytes in length. To strictly comply with Bitcoin spec would require a new class capable of longer strings. Although as a practical matter no existing messages support string lengths beyond the Int32 limit.

Описание методов

GetVarString() публичный статический Метод

Extension Method for string type Returns a byte array with string length as a VarInt followed by string contents Is a Bitcoin Protocol specific structure https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_string Limitation: The Bitcoin protocol supports string up to 2^64 -1 (unit64) bytes in length. The C# built in type "string" only supports strings up to 2^31-1 (singed int32) bytes in length. To strictly comply with Bitcoin spec would require a new class capable of longer strings. Although as a practical matter no existing messages support string lengths beyond the Int32 limit.
public static GetVarString ( this str ) : byte[]
str this Instance of the string class being extended.
Результат byte[]