GNUnet  0.18.1
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 179 of file gnunet-chk.py.

Constructor & Destructor Documentation

◆ __init__()

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

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

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

References gnunet-chk.AESKey.key, gnunet-chk.Chk.key, SetEntry.key, TaskEntry.key, ReferendumEntry.key, DiffEntry.key, GetClosestContext.key, HandleResultContext.key, GetKeyMessage.key, DataMessage.key, DataRecord.key, Value.key, GNUNET_DHT_ClientGetStopMessage.key, GNUNET_DHT_ClientGetMessage.key, GNUNET_DHT_ClientGetResultSeenMessage.key, GNUNET_DHT_ClientResultMessage.key, GNUNET_DHT_ClientPutMessage.key, GNUNET_DHT_MonitorPutMessage.key, GNUNET_DHT_MonitorStartStopMessage.key, GNUNET_DHT_MonitorGetMessage.key, GNUNET_DHT_MonitorGetRespMessage.key, GNUNET_DHT_GetHandle.key, GNUNET_DHT_MonitorHandle.key, ClientMonitorRecord.key, GetActionContext.key, ClientQueryRecord.key, GetRequestContext.key, PeerPutMessage.key, PeerResultMessage.key, PeerGetMessage.key, RecentRequest.key, ContentHashKey.key, GNUNET_FS_SearchResult.key, ProxyCA.key, ProxyGNSCertificate.key, KeyCacheLine.key, RegexAcceptBlock.key, GNUNET_CRYPTO_AuthKey.key, GNUNET_DATACACHE_Block.key, GNUNET_MESSENGER_MessageJoin.key, GNUNET_MESSENGER_MessageInvite.key, GNUNET_MESSENGER_MessageKey.key, GNUNET_MESSENGER_MessageFile.key, GNUNET_MESSENGER_MessagePrivate.key, GNUNET_MESSENGER_MessageBody.key, GNUNET_MESSENGER_RoomEntryRecord.key, GNUNET_PEERSTORE_Record.key, GNUNET_SCALARPRODUCT_Element.key, GNUNET_UriParam.key, GNUNET_MESSENGER_MemberMessage.key, GNUNET_MESSENGER_SendMessage.key, GNUNET_MESSENGER_RoomMessage.key, GNUNET_MESSENGER_RecvMessage.key, GNUNET_MESSENGER_GetMessage.key, GNUNET_MESSENGER_SrvRoom.key, GNUNET_MESSENGER_Room.key, RequestData.key, MarkedRecord.key, Zone.key, GNUNET_PEERSTORE_StoreContext.key, GNUNET_PEERSTORE_IterateContext.key, MpiElement.key, GNUNET_SCALARPRODUCT_ComputationHandle.key, GNUNET_TESTBED_Barrier.key, Plugin.key, ConfigEntry.key, BigMapEntry.key, SmallMapEntry.key, MapEntry.key, DestinationEntry.key, len, gnunet-chk.Chk.query, SearchMessage.query, ContentHashKey.query, ProcessResultClosure.query, GetMessage.query, CadetQueryMessage.query, GSF_CadetRequest.query, GSF_PendingRequestData.query, MigrationReadyBlock.query, GNUNET_FS_ProgressInfo.query, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent.query, GNUNET_Uri.query, GNUNET_MYSQL_StatementHandle.query, LookupBlockMessage.query, FlatFileEntry.query, and SearchContext.query.

Member Function Documentation

◆ setSize()

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

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

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

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

◆ uri()

def gnunet-chk.Chk.uri (   self)

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

194  def uri(self):
195  sizestr = repr(self.fsize)
196  if isinstance(self.fsize, int):
197  sizestr = sizestr[:-1]
198  return GNUNET_FS_URI_PREFIX + GNUNET_FS_URI_CHK_INFIX + \
199  encode_data_to_string(bytearray(self.key)) + "." + \
200  encode_data_to_string(bytearray(self.query)) + "." + \
201  sizestr
202 
203 
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:50

References gnunet-chk.encode_data_to_string(), gnunet-chk.Chk.fsize, GNUNET_CRYPTO_FileHashContext.fsize, gnunet-chk.AESKey.key, gnunet-chk.Chk.key, SetEntry.key, TaskEntry.key, ReferendumEntry.key, DiffEntry.key, GetClosestContext.key, HandleResultContext.key, GetKeyMessage.key, DataMessage.key, DataRecord.key, Value.key, GNUNET_DHT_ClientGetStopMessage.key, GNUNET_DHT_ClientGetMessage.key, GNUNET_DHT_ClientGetResultSeenMessage.key, GNUNET_DHT_ClientResultMessage.key, GNUNET_DHT_ClientPutMessage.key, GNUNET_DHT_MonitorPutMessage.key, GNUNET_DHT_MonitorStartStopMessage.key, GNUNET_DHT_MonitorGetMessage.key, GNUNET_DHT_MonitorGetRespMessage.key, GNUNET_DHT_GetHandle.key, GNUNET_DHT_MonitorHandle.key, ClientMonitorRecord.key, GetActionContext.key, ClientQueryRecord.key, GetRequestContext.key, PeerPutMessage.key, PeerResultMessage.key, PeerGetMessage.key, RecentRequest.key, ContentHashKey.key, GNUNET_FS_SearchResult.key, ProxyCA.key, ProxyGNSCertificate.key, KeyCacheLine.key, RegexAcceptBlock.key, GNUNET_CRYPTO_AuthKey.key, GNUNET_DATACACHE_Block.key, GNUNET_MESSENGER_MessageJoin.key, GNUNET_MESSENGER_MessageKey.key, GNUNET_MESSENGER_MessageInvite.key, GNUNET_MESSENGER_MessageFile.key, GNUNET_MESSENGER_MessagePrivate.key, GNUNET_MESSENGER_MessageBody.key, GNUNET_MESSENGER_RoomEntryRecord.key, GNUNET_PEERSTORE_Record.key, GNUNET_SCALARPRODUCT_Element.key, GNUNET_UriParam.key, GNUNET_MESSENGER_RoomMessage.key, GNUNET_MESSENGER_MemberMessage.key, GNUNET_MESSENGER_SendMessage.key, GNUNET_MESSENGER_GetMessage.key, GNUNET_MESSENGER_RecvMessage.key, GNUNET_MESSENGER_SrvRoom.key, GNUNET_MESSENGER_Room.key, RequestData.key, MarkedRecord.key, Zone.key, GNUNET_PEERSTORE_StoreContext.key, GNUNET_PEERSTORE_IterateContext.key, MpiElement.key, GNUNET_SCALARPRODUCT_ComputationHandle.key, GNUNET_TESTBED_Barrier.key, Plugin.key, ConfigEntry.key, BigMapEntry.key, SmallMapEntry.key, MapEntry.key, DestinationEntry.key, gnunet-chk.Chk.query, SearchMessage.query, ContentHashKey.query, ProcessResultClosure.query, GetMessage.query, CadetQueryMessage.query, GSF_CadetRequest.query, GSF_PendingRequestData.query, MigrationReadyBlock.query, GNUNET_FS_ProgressInfo.query, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent.query, GNUNET_Uri.query, GNUNET_MYSQL_StatementHandle.query, LookupBlockMessage.query, FlatFileEntry.query, and SearchContext.query.

Here is the call graph for this function:

Field Documentation

◆ key

gnunet-chk.Chk.key = None
static

◆ query

gnunet-chk.Chk.query = None
static

Definition at line 182 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 183 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: