GNUnet 0.22.0
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

References gnunet-chk.AESKey.key, gnunet-chk.Chk.key, DataRecord.key, MarkedRecord.key, Zone.key, SetEntry.key, TaskEntry.key, ReferendumEntry.key, DiffEntry.key, MpiElement.key, GNUNET_SCALARPRODUCT_ComputationHandle.key, RegexAcceptBlock.key, GNUNET_CRYPTO_AuthKey.key, GNUNET_CRYPTO_HpkeContext.key, GNUNET_DATACACHE_Block.key, GNUNET_MESSENGER_RoomEntryRecord.key, GNUNET_MESSENGER_MessageJoin.key, GNUNET_MESSENGER_MessageKey.key, GNUNET_MESSENGER_MessageInvite.key, GNUNET_MESSENGER_MessageFile.key, GNUNET_MESSENGER_MessagePrivate.key, GNUNET_MESSENGER_MessageTranscript.key, GNUNET_MESSENGER_MessageBody.key, GNUNET_PEERSTORE_Record.key, GNUNET_SCALARPRODUCT_Element.key, GNUNET_UriParam.key, KeyCacheLine.key, ConfigEntry.key, BigMapEntry.key, SmallMapEntry.key, MapEntry.key, GetClosestContext.key, HandleResultContext.key, Value.key, GetKeyMessage.key, DataMessage.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, PeerPutMessage.key, GNUNET_DHT_GetHandle.key, GNUNET_DHT_MonitorHandle.key, ClientQueryRecord.key, ClientMonitorRecord.key, GetActionContext.key, GetRequestContext.key, PeerResultMessage.key, PeerGetMessage.key, RecentRequest.key, ContentHashKey.key, GNUNET_FS_SearchResult.key, ProxyCA.key, ProxyGNSCertificate.key, GNUNET_MESSENGER_RoomMessage.key, GNUNET_MESSENGER_MemberMessage.key, GNUNET_MESSENGER_SendMessage.key, GNUNET_MESSENGER_GetMessage.key, GNUNET_MESSENGER_RecvMessage.key, GNUNET_MESSENGER_SrvHandle.key, GNUNET_MESSENGER_SrvRoom.key, GNUNET_MESSENGER_Handle.key, GNUNET_MESSENGER_Room.key, Monitor.key, Iteration.key, GNUNET_PEERSTORE_StoreContext.key, GNUNET_PEERSTORE_IterateContext.key, GNUNET_PEERSTORE_Monitor.key, Queue.key, SenderAddress.key, ReceiverAddress.key, DestinationEntry.key, gnunet-chk.Chk.query, GNUNET_FS_ProgressInfo.query, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent.query, GNUNET_Uri.query, FlatFileEntry.query, ContentHashKey.query, SearchMessage.query, ProcessResultClosure.query, GetMessage.query, CadetQueryMessage.query, GSF_CadetRequest.query, GSF_PendingRequestData.query, MigrationReadyBlock.query, and LookupBlockMessage.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, DataRecord.key, MarkedRecord.key, Zone.key, SetEntry.key, TaskEntry.key, ReferendumEntry.key, DiffEntry.key, MpiElement.key, GNUNET_SCALARPRODUCT_ComputationHandle.key, RegexAcceptBlock.key, GNUNET_CRYPTO_AuthKey.key, GNUNET_CRYPTO_HpkeContext.key, GNUNET_DATACACHE_Block.key, GNUNET_MESSENGER_RoomEntryRecord.key, GNUNET_MESSENGER_MessageJoin.key, GNUNET_MESSENGER_MessageKey.key, GNUNET_MESSENGER_MessageInvite.key, GNUNET_MESSENGER_MessageFile.key, GNUNET_MESSENGER_MessagePrivate.key, GNUNET_MESSENGER_MessageTranscript.key, GNUNET_MESSENGER_MessageBody.key, GNUNET_PEERSTORE_Record.key, GNUNET_SCALARPRODUCT_Element.key, GNUNET_UriParam.key, KeyCacheLine.key, ConfigEntry.key, BigMapEntry.key, SmallMapEntry.key, MapEntry.key, GetClosestContext.key, HandleResultContext.key, Value.key, GetKeyMessage.key, DataMessage.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, PeerPutMessage.key, GNUNET_DHT_GetHandle.key, GNUNET_DHT_MonitorHandle.key, ClientQueryRecord.key, ClientMonitorRecord.key, GetActionContext.key, GetRequestContext.key, PeerResultMessage.key, PeerGetMessage.key, RecentRequest.key, ContentHashKey.key, GNUNET_FS_SearchResult.key, ProxyCA.key, ProxyGNSCertificate.key, GNUNET_MESSENGER_RoomMessage.key, GNUNET_MESSENGER_MemberMessage.key, GNUNET_MESSENGER_SendMessage.key, GNUNET_MESSENGER_GetMessage.key, GNUNET_MESSENGER_RecvMessage.key, GNUNET_MESSENGER_SrvHandle.key, GNUNET_MESSENGER_SrvRoom.key, GNUNET_MESSENGER_Handle.key, GNUNET_MESSENGER_Room.key, Monitor.key, Iteration.key, GNUNET_PEERSTORE_StoreContext.key, GNUNET_PEERSTORE_IterateContext.key, GNUNET_PEERSTORE_Monitor.key, Queue.key, SenderAddress.key, ReceiverAddress.key, DestinationEntry.key, gnunet-chk.Chk.query, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent.query, GNUNET_FS_ProgressInfo.query, GNUNET_Uri.query, FlatFileEntry.query, ContentHashKey.query, SearchMessage.query, ProcessResultClosure.query, GetMessage.query, CadetQueryMessage.query, GSF_CadetRequest.query, GSF_PendingRequestData.query, MigrationReadyBlock.query, and LookupBlockMessage.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: