[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] branch master updated (f16f20c -> 7d1e
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] branch master updated (f16f20c -> 7d1ef65) |
Date: |
Thu, 09 Mar 2017 18:26:42 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a change to branch master
in repository wallet-webex.
from f16f20c test with fixed data to diagnose emscripten problem
new 0466ed0 also test public key
new 7d1ef65 rsa encode/decode test
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/emscriptif-test.ts | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/emscriptif-test.ts b/src/emscriptif-test.ts
index ba83a97..f0baa2b 100644
--- a/src/emscriptif-test.ts
+++ b/src/emscriptif-test.ts
@@ -13,11 +13,9 @@ test("string hashing", (t: TestLib) => {
test("signing", (t: TestLib) => {
let x = native.ByteArray.fromStringWithNull("hello taler");
let priv = native.EddsaPrivateKey.create();
- console.log("priv", priv.toCrock())
let pub = priv.getPublicKey();
let purpose = new native.EccSignaturePurpose(native.SignaturePurpose.TEST,
x);
let sig = native.eddsaSign(purpose, priv);
- console.log("sig", sig.toCrock())
t.assert(native.eddsaVerify(native.SignaturePurpose.TEST, purpose, sig,
pub));
t.pass();
});
@@ -26,10 +24,12 @@ test("signing-fixed-data", (t: TestLib) => {
let x = native.ByteArray.fromStringWithNull("hello taler");
let purpose = new native.EccSignaturePurpose(native.SignaturePurpose.TEST,
x);
const privStr = "G9R8KRRCAFKPD0KW7PW48CC2T03VQ8K2AN9J6J6K2YW27J5MHN90";
+ const pubStr = "YHCZB442FQFJ0ET20MWA8YJ53M61EZGJ6QKV1KTJZMRNXDY45WT0";
const sigStr =
"7V6XY4QGC1406GPMT305MZQ1HDCR7R0S5BP02GTGDQFPSXB6YD2YDN5ZS7NJQCNP61Y39MRHXNXQ1Z15JY4CJY4CPDA6CKQ3313WG38";
let priv = native.EddsaPrivateKey.fromCrock(privStr);
t.assert(privStr == priv.toCrock())
let pub = priv.getPublicKey();
+ t.assert(pubStr == pub.toCrock());
let sig = native.EddsaSignature.fromCrock(sigStr);
t.assert(sigStr == sig.toCrock())
let sig2 = native.eddsaSign(purpose, priv);
@@ -37,3 +37,13 @@ test("signing-fixed-data", (t: TestLib) => {
t.assert(native.eddsaVerify(native.SignaturePurpose.TEST, purpose, sig,
pub));
t.pass();
});
+
+const denomPubStr1 =
"51R7ARKCD5HJTTV5F4G0M818E9SP280A40G2GVH04CR30G9R64VK6HHS6MW42DSN8MVKJGHK6WR3CGT18MWMCDSM75138E1K8S0MADSQ68W34DHH6MW4CHA270W4CG9J6GW48DHG8MVK4E9S7523GEA56H0K4E1Q891KCCSG752KGC1M88VMCDSQ6D23CHHG8H33AGHG6MSK8GT26CRKAC1M64V3JCJ56CVKCC228MWMCHA26MS30H1J8MVKEDHJ70TMADHK892KJC1H60TKJDHM710KGGT584T38H9K851KCDHG60W30HJ28CT4CC1G8CR3JGJ28H236DJ28H330H9S890M2D9S8S14AGA369344GA36S248CHS70RKEDSS6MWKGDJ26D136GT465348CSS8S232CHM6GS34C9N8CS3GD9H60W36H1R8MSK2GSQ8MSM6C9R70SKCHHN6MW3AC
[...]
+
+test("rsa-encode", (t: TestLib) => {
+ const pubHashStr =
"JM63YM5X7X547164QJ3MGJZ4WDD47GEQR5DW5SH35G4JFZXEJBHE5JBNZM5K8XN5C4BRW25BE6GSVAYBF790G2BZZ13VW91D41S4DS0"
+ let denomPub = native.RsaPublicKey.fromCrock(denomPubStr1);
+ let pubHash = denomPub.encode().hash();
+ t.assert(pubHashStr == pubHash.toCrock());
+ t.pass();
+});
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-wallet-webex] branch master updated (f16f20c -> 7d1ef65),
gnunet <=