aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/talerCrypto.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-11-23 23:51:12 +0100
committerFlorian Dold <florian@dold.me>2021-11-23 23:51:12 +0100
commitae8af3f27c0ed1746c49a7608fe05af24ae8a18b (patch)
treec28f588071bdd1d4cda2279e62563a3664d79be9 /packages/taler-util/src/talerCrypto.ts
parent829a59e1a24d6a99ce7554d28acfd05f21baeaf8 (diff)
downloadwallet-core-ae8af3f27c0ed1746c49a7608fe05af24ae8a18b.tar.xz
wallet: tipping protocol change / merchant version info
Diffstat (limited to 'packages/taler-util/src/talerCrypto.ts')
-rw-r--r--packages/taler-util/src/talerCrypto.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-util/src/talerCrypto.ts b/packages/taler-util/src/talerCrypto.ts
index b107786cd..c20ce72a6 100644
--- a/packages/taler-util/src/talerCrypto.ts
+++ b/packages/taler-util/src/talerCrypto.ts
@@ -24,7 +24,7 @@
import * as nacl from "./nacl-fast.js";
import { kdf } from "./kdf.js";
import bigint from "big-integer";
-import { DenominationPubKey } from "./talerTypes.js";
+import { DenominationPubKey, DenomKeyType } from "./talerTypes.js";
export function getRandomBytes(n: number): Uint8Array {
return nacl.randomBytes(n);
@@ -350,7 +350,7 @@ export function hash(d: Uint8Array): Uint8Array {
}
export function hashDenomPub(pub: DenominationPubKey): Uint8Array {
- if (pub.cipher !== 1) {
+ if (pub.cipher !== DenomKeyType.Rsa) {
throw Error("unsupported cipher");
}
const pubBuf = decodeCrock(pub.rsa_public_key);