public static byte[] GetScriptHashFromScript(byte[] script) { var scripthash = sha256.ComputeHash(script); scripthash = ripemd160.ComputeHash(scripthash); return(scripthash); }
public static byte[] GetScriptHashFromPublicKey(byte[] publicKey) { byte[] script = GetScriptFromPublicKey(publicKey); var scripthash = sha256.ComputeHash(script); scripthash = ripemd160.ComputeHash(scripthash); return(scripthash); }
public static Hash160 GetScriptHashFromScript(byte[] script) { System.Security.Cryptography.SHA256 sha256 = getSha256(); var scripthash = sha256.ComputeHash(script); RIPEMD160Managed ripemd160 = getRipemd160(); scripthash = ripemd160.ComputeHash(scripthash); return(scripthash); }