类的使用
network.nerve.core.crypto.Sha256Hash
-
使用Sha256Hash的程序包 程序包 说明 network.nerve.core.crypto -
-
network.nerve.core.crypto中Sha256Hash的使用
声明为Sha256Hash的network.nerve.core.crypto中的字段 修饰符和类型 字段 说明 static Sha256HashSha256Hash. ZERO_HASH返回Sha256Hash的network.nerve.core.crypto中的方法 修饰符和类型 方法 说明 static Sha256HashSha256Hash. create(byte[] contents)已过时。static Sha256HashSha256Hash. createDouble(byte[] contents)已过时。static Sha256HashSha256Hash. of(byte[] contents)Creates a new instance containing the calculated (one-time) hash of the given bytes.static Sha256HashSha256Hash. of(File file)Creates a new instance containing the calculated (one-time) hash of the given file's contents.static Sha256HashSha256Hash. twiceOf(byte[] contents)Creates a new instance containing the hash of the calculated hash of the given bytes.static Sha256HashSha256Hash. wrap(byte[] rawHashBytes)Creates a new instance that wraps the given hash value.static Sha256HashSha256Hash. wrap(String hexString)Creates a new instance that wraps the given hash value (represented as a hex string).static Sha256HashSha256Hash. wrapReversed(byte[] rawHashBytes)Creates a new instance that wraps the given hash value, but with byte order reversed.参数类型为Sha256Hash的network.nerve.core.crypto中的方法 修饰符和类型 方法 说明 intSha256Hash. compareTo(Sha256Hash other)byteECKey. findRecoveryId(Sha256Hash hash, ECKey.ECDSASignature sig)Returns the recovery ID, a byte with value between 0 and 3, inclusive, that specifies which of 4 possible curve points was used to sign a message.static ECKeyECKey. recoverFromSignature(int recId, ECKey.ECDSASignature sig, Sha256Hash message, boolean compressed)Given the components of a signature and a selector value, recover and return the public key that generated the signature according to the algorithm in SEC1v2 section 4.1.6.byte[]ECKey. sign(Sha256Hash hash)用私钥对数据进行签名booleanECKey. verify(Sha256Hash sigHash, ECKey.ECDSASignature signature)Verifies the given R/S pair (signature) against a hash using the public key.voidECKey. verifyOrThrow(Sha256Hash sigHash, ECKey.ECDSASignature signature)Verifies the given R/S pair (signature) against a hash using the public key, and throws an exception if the signature doesn't match
-