示例#1
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)))));
 }
示例#2
0
 public StackItem ToStackItem(ReferenceCounter referenceCounter)
 {
     return(new Array(referenceCounter, new StackItem[] { Id, (int)UpdateCounter, Hash.ToArray(), Nef.ToArray(), Manifest.ToStackItem(referenceCounter) }));
 }