GNUnet  0.11.x
Public Member Functions | Static Public Attributes
gnunet-chk.Chk Class Reference
Inheritance diagram for gnunet-chk.Chk:
[legend]
Collaboration diagram for gnunet-chk.Chk:
[legend]

Public Member Functions

def __init__ (self, key, query)
 
def setSize (self, size)
 
def uri (self)
 

Static Public Attributes

 key = None
 
 query = None
 
 fsize = None
 

Detailed Description

Class for the content hash key.

Definition at line 180 of file gnunet-chk.py.

Constructor & Destructor Documentation

◆ __init__()

def gnunet-chk.Chk.__init__ (   self,
  key,
  query 
)

Definition at line 186 of file gnunet-chk.py.

References QueryMessage.key, ConfigEntry.key, MapEntry.key, BigMapEntry.key, Value.key, DataRecord.key, GNUNET_DHT_ClientGetStopMessage.key, MpiElement.key, SmallMapEntry.key, DestinationEntry.key, GNUNET_SCALARPRODUCT_ComputationHandle.key, GNUNET_DHT_ClientGetMessage.key, RegexAcceptBlock.key, Zone.key, gnunet-chk.AESKey.key, GNUNET_DHT_GetHandle.key, SetEntry.key, GetRequestContext.key, GNUNET_PEERSTORE_Record.key, GNUNET_DHT_ClientGetResultSeenMessage.key, GetKeyMessage.key, GNUNET_PEERSTORE_StoreContext.key, PeerPutMessage.key, ClientMonitorRecord.key, GNUNET_DHT_ClientResultMessage.key, GNUNET_DHT_MonitorHandle.key, gnunet-chk.Chk.key, Plugin.key, PeerResultMessage.key, GNUNET_PEERSTORE_IterateContext.key, TaskEntry.key, GNUNET_SCALARPRODUCT_Element.key, HandleResultContext.key, GNUNET_DHT_ClientPutMessage.key, DataMessage.key, PeerGetMessage.key, GNUNET_DHT_MonitorPutMessage.key, GNUNET_TESTBED_Barrier.key, GNUNET_DHT_MonitorStartStopMessage.key, GNUNET_CRYPTO_AuthKey.key, ProxyCA.key, ReferendumEntry.key, ProxyGNSCertificate.key, GNUNET_DHT_MonitorGetMessage.key, DiffEntry.key, GNUNET_DHT_MonitorGetRespMessage.key, ContentHashKey.key, GetClosestContext.key, KeyCacheLine.key, RecentRequest.key, RevocationData.key, GNUNET_FS_SearchResult.key, ClientQueryRecord.key, len, LookupBlockMessage.query, FlatFileEntry.query, MigrationReadyBlock.query, GSF_CadetRequest.query, GetMessage.query, GNUNET_MYSQL_StatementHandle.query, CadetQueryMessage.query, gnunet-chk.Chk.query, SearchMessage.query, SearchContext.query, ContentHashKey.query, GSF_PendingRequestData.query, GNUNET_FS_ProgressInfo::.query, GNUNET_FS_ProgressInfo.query, and ProcessResultClosure.query.

186  def __init__(self, key, query):
187  assert (len(key) == CHK_HASH_SIZE)
188  assert (len(query) == CHK_QUERY_SIZE)
189  self.key = key
190  self.query = query
191 
uint16_t len
length of data (which is always a uint32_t, but presumably this can be used to specify that fewer byt...

Member Function Documentation

◆ setSize()

def gnunet-chk.Chk.setSize (   self,
  size 
)

Definition at line 192 of file gnunet-chk.py.

References GNUNET_CRYPTO_FileHashContext.fsize, and gnunet-chk.Chk.fsize.

192  def setSize(self, size):
193  self.fsize = size
194 

◆ uri()

def gnunet-chk.Chk.uri (   self)

Definition at line 195 of file gnunet-chk.py.

References gnunet-chk.encode_data_to_string(), GNUNET_CRYPTO_FileHashContext.fsize, gnunet-chk.Chk.fsize, QueryMessage.key, ConfigEntry.key, MapEntry.key, BigMapEntry.key, Value.key, DataRecord.key, GNUNET_DHT_ClientGetStopMessage.key, MpiElement.key, SmallMapEntry.key, DestinationEntry.key, GNUNET_SCALARPRODUCT_ComputationHandle.key, GNUNET_DHT_ClientGetMessage.key, RegexAcceptBlock.key, Zone.key, gnunet-chk.AESKey.key, GNUNET_DHT_GetHandle.key, SetEntry.key, GetRequestContext.key, GNUNET_PEERSTORE_Record.key, GNUNET_DHT_ClientGetResultSeenMessage.key, GetKeyMessage.key, GNUNET_PEERSTORE_StoreContext.key, PeerPutMessage.key, ClientMonitorRecord.key, GNUNET_DHT_ClientResultMessage.key, GNUNET_DHT_MonitorHandle.key, gnunet-chk.Chk.key, Plugin.key, PeerResultMessage.key, GNUNET_PEERSTORE_IterateContext.key, TaskEntry.key, GNUNET_SCALARPRODUCT_Element.key, HandleResultContext.key, GNUNET_DHT_ClientPutMessage.key, DataMessage.key, PeerGetMessage.key, GNUNET_DHT_MonitorPutMessage.key, GNUNET_TESTBED_Barrier.key, GNUNET_DHT_MonitorStartStopMessage.key, GNUNET_CRYPTO_AuthKey.key, ProxyCA.key, ReferendumEntry.key, ProxyGNSCertificate.key, GNUNET_DHT_MonitorGetMessage.key, DiffEntry.key, GNUNET_DHT_MonitorGetRespMessage.key, ContentHashKey.key, GetClosestContext.key, KeyCacheLine.key, RecentRequest.key, RevocationData.key, GNUNET_FS_SearchResult.key, ClientQueryRecord.key, LookupBlockMessage.query, FlatFileEntry.query, MigrationReadyBlock.query, GSF_CadetRequest.query, GetMessage.query, GNUNET_MYSQL_StatementHandle.query, CadetQueryMessage.query, gnunet-chk.Chk.query, SearchMessage.query, SearchContext.query, ContentHashKey.query, GSF_PendingRequestData.query, GNUNET_FS_ProgressInfo::.query, GNUNET_FS_ProgressInfo.query, and ProcessResultClosure.query.

195  def uri(self):
196  sizestr = repr(self.fsize)
197  if isinstance(self.fsize, int):
198  sizestr = sizestr[:-1]
199  return GNUNET_FS_URI_PREFIX + GNUNET_FS_URI_CHK_INFIX + \
200  encode_data_to_string(bytearray(self.key)) + "." + \
201  encode_data_to_string(bytearray(self.query)) + "." + \
202  sizestr
203 
204 
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
def encode_data_to_string(data)
Definition: gnunet-chk.py:51
Here is the call graph for this function:

Field Documentation

◆ key

gnunet-chk.Chk.key = None
static

Definition at line 182 of file gnunet-chk.py.

Referenced by gnunet-chk.Chk.__init__(), and gnunet-chk.Chk.uri().

◆ query

gnunet-chk.Chk.query = None
static

Definition at line 183 of file gnunet-chk.py.

Referenced by gnunet-chk.Chk.__init__(), and gnunet-chk.Chk.uri().

◆ fsize

gnunet-chk.Chk.fsize = None
static

Definition at line 184 of file gnunet-chk.py.

Referenced by gnunet-chk.Chk.setSize(), and gnunet-chk.Chk.uri().


The documentation for this class was generated from the following file: