-
大小: 9.1MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-10-17
- 语言: Java
- 标签:
资源简介
在Linux系统中安装区块链以太坊服务,java或者其他语言调用以太坊服务,实现转账和挖矿操作
代码片段和文件信息
/**********************************************************************
* Copyright (c) 2015 Pieter Wuille *
* Distributed under the MIT software license see the accompanying *
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
**********************************************************************/
#include
#include
#include “lax_der_parsing.h“
int ecdsa_signature_parse_der_lax(const secp256k1_context* ctx secp256k1_ecdsa_signature* sig const unsigned char *input size_t inputlen) {
size_t rpos rlen spos slen;
size_t pos = 0;
size_t lenbyte;
unsigned char tmpsig[64] = {0};
int overflow = 0;
/* Hack to initialize sig with a correctly-parsed but invalid signature. */
secp256k1_ecdsa_signature_parse_compact(ctx sig tmpsig);
/* Sequence tag byte */
if (pos == inputlen || input[pos] != 0x30) {
return 0;
}
pos++;
/* Sequence length bytes */
if (pos == inputlen) {
return 0;
}
lenbyte = input[pos++];
if (lenbyte & 0x80) {
lenbyte -= 0x80;
if (pos + lenbyte > inputlen) {
return 0;
}
pos += lenbyte;
}
/* Integer tag byte for R */
if (pos == inputlen || input[pos] != 0x02) {
return 0;
}
pos++;
/* Integer length for R */
if (pos == inputlen) {
return 0;
}
lenbyte = input[pos++];
if (lenbyte & 0x80) {
lenbyte -= 0x80;
if (pos + lenbyte > inputlen) {
return 0;
}
while (lenbyte > 0 && input[pos] == 0) {
pos++;
lenbyte--;
}
if (lenbyte >= sizeof(size_t)) {
return 0;
}
rlen = 0;
while (lenbyte > 0) {
rlen = (rlen << 8) + input[pos];
pos++;
lenbyte--;
}
} else {
rlen = lenbyte;
}
if (rlen > inputlen - pos) {
return 0;
}
rpos = pos;
pos += rlen;
/* Integer tag byte for S */
if (pos == inputlen || input[pos] != 0x02) {
return 0;
}
pos++;
/* Integer length for S */
if (pos == inputlen) {
return 0;
}
lenbyte = input[pos++];
if (lenbyte & 0x80) {
lenbyte -= 0x80;
if (pos + lenbyte > inputlen) {
return 0;
}
while (lenbyte > 0 && input[pos] == 0) {
pos++;
lenbyte--;
}
if (lenbyte >= sizeof(size_t)) {
return 0;
}
slen = 0;
while (lenbyte > 0) {
slen = (slen << 8) + input[pos];
pos++;
lenbyte--;
}
} else {
slen = lenbyte;
}
if (slen > inputlen - pos) {
return 0;
}
spos = pos;
pos += slen;
/* Ignore leading zeroes in R */
while (rlen > 0 && input[rpos] == 0) {
rlen--;
rpos++;
}
/* Copy R value */
if (rlen > 3
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-21 01:54 go-ethereum-release-1.7\
文件 98 2017-11-21 01:54 go-ethereum-release-1.7\.dockerignore
文件 66 2017-11-21 01:54 go-ethereum-release-1.7\.gitattributes
目录 0 2017-11-21 01:54 go-ethereum-release-1.7\.github\
文件 293 2017-11-21 01:54 go-ethereum-release-1.7\.github\CODEOWNERS
文件 702 2017-11-21 01:54 go-ethereum-release-1.7\.github\CONTRIBUTING.md
文件 468 2017-11-21 01:54 go-ethereum-release-1.7\.github\ISSUE_TEMPLATE.md
文件 664 2017-11-21 01:54 go-ethereum-release-1.7\.gitignore
文件 84 2017-11-21 01:54 go-ethereum-release-1.7\.gitmodules
文件 2781 2017-11-21 01:54 go-ethereum-release-1.7\.mailmap
文件 8221 2017-11-21 01:54 go-ethereum-release-1.7\.travis.yml
目录 0 2017-11-21 01:54 go-ethereum-release-1.7\accounts\
目录 0 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\
文件 3850 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\abi.go
文件 12365 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\abi_test.go
文件 1441 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\argument.go
目录 0 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\
文件 2122 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\auth.go
文件 4692 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\backend.go
目录 0 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\backends\
文件 12110 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\backends\simulated.go
文件 8665 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\ba
文件 10124 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\bind.go
文件 49263 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\bind_test.go
文件 18952 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\template.go
文件 2547 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\util.go
文件 2936 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\bind\util_test.go
文件 1227 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\doc.go
文件 2677 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\error.go
文件 4189 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\event.go
文件 1795 2017-11-21 01:54 go-ethereum-release-1.7\accounts\abi\event_test.go
............此处省略2493个文件信息
评论
共有 条评论