mirror of
https://github.com/hanzoai/elliptic.git
synced 2026-09-23 23:51:03 +00:00
package: remove Makefile and dist
This commit is contained in:
committed by
Fedor Indutny
parent
b0a8f43981
commit
7cffa3b9e8
@@ -1,23 +0,0 @@
|
||||
BROWSERIFY ?= ./node_modules/.bin/browserify
|
||||
UGLIFY ?= ./node_modules/.bin/uglifyjs
|
||||
JSCS ?= ./node_modules/.bin/jscs
|
||||
JSHINT ?= ./node_modules/.bin/jshint
|
||||
|
||||
SOURCES = lib/*.js lib/**/*.js lib/**/**/*.js
|
||||
|
||||
all: dist/elliptic.js dist/elliptic.min.js \
|
||||
dist/elliptic-small.js dist/elliptic-small.min.js
|
||||
|
||||
dist/elliptic.js: lib/elliptic.js
|
||||
$(BROWSERIFY) --standalone ellipticjs $< -o $@
|
||||
|
||||
dist/elliptic-small.js: lib/elliptic.js
|
||||
$(BROWSERIFY) --standalone ellipticjs --exclude lib/elliptic/precomputed/* $< -o $@
|
||||
|
||||
%.min.js: %.js
|
||||
$(UGLIFY) --compress --mangle < $< > $@
|
||||
|
||||
lint: $(SOURCES)
|
||||
$(JSCS) $(SOURCES) && $(JSHINT) $(SOURCES)
|
||||
|
||||
.PHONY: all lint
|
||||
+2
-2
@@ -95,7 +95,7 @@ add('sign', {
|
||||
},
|
||||
secp256k1: function() {
|
||||
secp256k1.sign(k4priv, m4);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
var os1 = crypto.createSign('RSA-SHA256').update(str).sign(ok);
|
||||
@@ -118,7 +118,7 @@ add('verify', {
|
||||
},
|
||||
secp256k1: function() {
|
||||
secp256k1.verify(k4pub, m4, s4);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
add('gen', {
|
||||
|
||||
Vendored
Vendored
-6114
File diff suppressed because it is too large
Load Diff
Vendored
-3
File diff suppressed because one or more lines are too long
Vendored
-6896
File diff suppressed because it is too large
Load Diff
Vendored
-4
File diff suppressed because one or more lines are too long
+6
-6
@@ -9,7 +9,9 @@
|
||||
"scripts": {
|
||||
"coverage": "npm run unit --coverage",
|
||||
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls",
|
||||
"lint": "make lint",
|
||||
"jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js",
|
||||
"jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js",
|
||||
"lint": "npm run jscs && npm run jshint",
|
||||
"test": "npm run lint && npm run unit",
|
||||
"unit": "istanbul test _mocha --reporter=spec test/*-test.js"
|
||||
},
|
||||
@@ -30,13 +32,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/indutny/elliptic",
|
||||
"devDependencies": {
|
||||
"browserify": "^3.44.2",
|
||||
"coveralls": "^2.11.3",
|
||||
"istanbul": "^0.3.17",
|
||||
"jscs": "^1.11.3",
|
||||
"istanbul": "^0.4.2",
|
||||
"jscs": "^2.9.0",
|
||||
"jshint": "^2.6.0",
|
||||
"mocha": "^2.1.0",
|
||||
"uglify-js": "^2.4.13"
|
||||
"mocha": "^2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bn.js": "^4.0.0",
|
||||
|
||||
+10
-10
@@ -183,7 +183,7 @@ describe('ECDSA', function() {
|
||||
r: '3a718bd8b4926c3b52ee6bbe67ef79b18cb6eb62b1ad97ae',
|
||||
s: '5662e6848a4a19b1f1ae2f72acd4b8bbe50f1eac65d9124f'
|
||||
}
|
||||
],
|
||||
]
|
||||
});
|
||||
|
||||
test({
|
||||
@@ -219,7 +219,7 @@ describe('ECDSA', function() {
|
||||
r: 'ad04dde87b84747a243a631ea47a1ba6d1faa059149ad2440de6fba6',
|
||||
s: '178d49b1ae90e3d8b629be3db5683915f4e8c99fdf6e666cf37adcfd'
|
||||
}
|
||||
],
|
||||
]
|
||||
});
|
||||
|
||||
test({
|
||||
@@ -255,7 +255,7 @@ describe('ECDSA', function() {
|
||||
r: 'f1abb023518351cd71d881567b1ea663ed3efcf6c5132b354f28d3b0b7d38367',
|
||||
s: '19f4113742a2b14bd25926b49c649155f267e60d3814b4c0cc84250e46f0083'
|
||||
}
|
||||
],
|
||||
]
|
||||
});
|
||||
|
||||
test({
|
||||
@@ -294,7 +294,7 @@ describe('ECDSA', function() {
|
||||
s: 'ddd0760448d42d8a43af45af836fce4de8be06b485e9b61b827c2f13' +
|
||||
'173923e06a739f040649a667bf3b828246baa5a5'
|
||||
}
|
||||
],
|
||||
]
|
||||
});
|
||||
|
||||
test({
|
||||
@@ -325,11 +325,11 @@ describe('ECDSA', function() {
|
||||
message: 'sample',
|
||||
hash: hash.sha512,
|
||||
r: 'c328fafcbd79dd77850370c46325d987cb525569fb63c5d3bc53950e6d4c5f1' +
|
||||
'74e25a1ee9017b5d450606add152b534931d7d4e8455cc91f9b15bf05ec36e37' +
|
||||
'7fa',
|
||||
'74e25a1ee9017b5d450606add152b534931d7d4e8455cc91f9b15bf05ec36e3' +
|
||||
'77fa',
|
||||
s: '617cce7cf5064806c467f678d3b4080d6f1cc50af26ca209417308281b68af2' +
|
||||
'82623eaa63e5b5c0723d8b8c37ff0777b1a20f8ccb1dccc43997f1ee0e44da4a' +
|
||||
'67a'
|
||||
'82623eaa63e5b5c0723d8b8c37ff0777b1a20f8ccb1dccc43997f1ee0e44da4' +
|
||||
'a67a'
|
||||
},
|
||||
{
|
||||
message: 'test',
|
||||
@@ -341,7 +341,7 @@ describe('ECDSA', function() {
|
||||
'f7e78a19ca69eff5c57400e3b3a0ad66ce0978214d13baf4e9ac60752f7b15' +
|
||||
'5e2de4dce3'
|
||||
}
|
||||
],
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
@@ -379,7 +379,7 @@ describe('ECDSA', function() {
|
||||
assert.throws(function() {
|
||||
ecdsa.recoverPubKey(message, {
|
||||
r: 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140',
|
||||
s: '8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3',
|
||||
s: '8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3'
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -15,7 +15,8 @@ var MAX_PROGRAMMATIC = process.env.CI ? Infinity : 50;
|
||||
|
||||
describe('ed25519 derivations', function() {
|
||||
var expectedTests = 256;
|
||||
var ed25519, derivations;
|
||||
var ed25519;
|
||||
var derivations;
|
||||
|
||||
before(function() {
|
||||
ed25519 = new eddsa('ed25519');
|
||||
@@ -42,7 +43,8 @@ describe('ed25519 derivations', function() {
|
||||
|
||||
describe('sign.input ed25519 test vectors', function() {
|
||||
var expectedTests = 1024;
|
||||
var ed25519, lines;
|
||||
var ed25519;
|
||||
var lines;
|
||||
|
||||
before(function(done) {
|
||||
ed25519 = new eddsa('ed25519');
|
||||
|
||||
@@ -29,7 +29,7 @@ describe('Hmac_DRBG', function() {
|
||||
pers: null,
|
||||
size: 32,
|
||||
res: 'ed5d61ecf0ef38258e62f03bbb49f19f2cd07ba5145a840d83b134d5963b3633'
|
||||
},
|
||||
}
|
||||
];
|
||||
for (var i = 0; i < test.length; i++)
|
||||
assert.equal(doDrbg(test[i]), test[i].res);
|
||||
|
||||
Reference in New Issue
Block a user