Exemple #1
0
 public StackItem ToStackItem(ReferenceCounter referenceCounter)
 {
     return(new Array(referenceCounter, new StackItem[] { Id, (int)UpdateCounter, Hash.ToArray(), Nef.ToArray(), Manifest.ToStackItem(referenceCounter) }));
 }
Exemple #2
0
 /// <summary>
 /// Compute checksum for a file
 /// </summary>
 /// <param name="file">File</param>
 /// <returns>Return checksum</returns>
 public static uint ComputeChecksum(NefFile file)
 {
     return(BitConverter.ToUInt32(Crypto.Hash256(file.ToArray().AsSpan(..^ sizeof(int)))));
 }
Exemple #3
0
 /// <summary>
 /// Computes the checksum for the specified nef file.
 /// </summary>
 /// <param name="file">The specified nef file.</param>
 /// <returns>The checksum of the nef file.</returns>
 public static uint ComputeChecksum(NefFile file)
 {
     return(BinaryPrimitives.ReadUInt32LittleEndian(Crypto.Hash256(file.ToArray().AsSpan(..^ sizeof(uint)))));
 }