예제 #1
0
 public PrivateKey?GetTpkePrivateKeyForBlock(ulong block)
 {
     try
     {
         return(_tpkeKeys.Predecessor(block + 1).Value);
     }
     catch (NoSuchItemException)
     {
         return(null);
     }
 }
예제 #2
0
 public bool HasKeyForKeySet(PublicKeySet thresholdSignaturePublicKeySet, ulong beforeBlock)
 {
     try
     {
         return(thresholdSignaturePublicKeySet.Keys.Contains(_tsKeys.Predecessor(beforeBlock).Value
                                                             .GetPublicKeyShare()));
     }
     catch (NoSuchItemException)
     {
         return(false);
     }
 }
예제 #3
0
 public K Predecessor(K item)
 {
     return(sorteddict.Predecessor(item).Key);
 }
 /// <summary>
 /// Get the entry in the wrapped dictionary whose key is the
 /// predecessor of a specified key.
 /// </summary>
 /// <exception cref="NoSuchItemException"> if no such entry exists </exception>
 /// <param name="key">The key</param>
 /// <returns>The entry</returns>
 public SCG.KeyValuePair <K, V> Predecessor(K key) => sorteddict.Predecessor(key);
예제 #5
0
 /// <summary>
 /// Get the entry in the wrapped dictionary whose key is the
 /// predecessor of a specified key.
 /// </summary>
 /// <exception cref="NoSuchItemException"> if no such entry exists </exception>
 /// <param name="key">The key</param>
 /// <returns>The entry</returns>
 public KeyValuePair <K, V> Predecessor(K key)
 {
     return(sorteddict.Predecessor(key));
 }