diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-13 19:39:30 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-13 19:39:30 +0100 |
commit | 95ad4639a36f1050ce823332b4a38583d45c0c11 (patch) | |
tree | cdf9c6a742f03d75f746f7ecaa6dc9ddf540328a /lib/wallet/emscriptif-test.ts | |
parent | 095b19aeb400a4d1da031856a93a3e23b5c743bc (diff) |
don't instrument emscripten output
Diffstat (limited to 'lib/wallet/emscriptif-test.ts')
-rw-r--r-- | lib/wallet/emscriptif-test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/wallet/emscriptif-test.ts b/lib/wallet/emscriptif-test.ts index a3a9229bb..ddafa32bc 100644 --- a/lib/wallet/emscriptif-test.ts +++ b/lib/wallet/emscriptif-test.ts @@ -9,3 +9,13 @@ test("string hashing", (t: TestLib) => { t.assert(h === hc, "must equal"); t.pass(); }); + +test("signing", (t: TestLib) => { + let x = native.ByteArray.fromStringWithNull("hello taler"); + let priv = native.EddsaPrivateKey.create(); + let pub = priv.getPublicKey(); + let purpose = new native.EccSignaturePurpose(native.SignaturePurpose.TEST, x); + let sig = native.eddsaSign(purpose, priv); + t.assert(native.eddsaVerify(native.SignaturePurpose.TEST, purpose, sig, pub)); + t.pass(); +}); |