aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/talerCrypto.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-04-07 13:37:32 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-04-07 13:37:32 +0530
commitfb2e2f89935240666de66e4b2c11125cb3b2943d (patch)
tree7b7e148e6cce7bf7639a5e35102f5269f5920ab5 /src/crypto/talerCrypto.ts
parent1471aae8927c20d646cc2aa5ab0e20c1a7f2c0ca (diff)
downloadwallet-core-fb2e2f89935240666de66e4b2c11125cb3b2943d.tar.xz
more lint fixes
Diffstat (limited to 'src/crypto/talerCrypto.ts')
-rw-r--r--src/crypto/talerCrypto.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/talerCrypto.ts b/src/crypto/talerCrypto.ts
index 3da4f4a47..457009a04 100644
--- a/src/crypto/talerCrypto.ts
+++ b/src/crypto/talerCrypto.ts
@@ -191,12 +191,12 @@ function kdfMod(
}
}
-export function stringToBytes(s: string) {
+export function stringToBytes(s: string): Uint8Array {
const te = new TextEncoder();
return te.encode(s);
}
-function loadBigInt(arr: Uint8Array) {
+function loadBigInt(arr: Uint8Array): bigint.BigInteger {
return bigint.fromArray(Array.from(arr), 256, false);
}
@@ -219,7 +219,7 @@ function rsaBlindingKeyDerive(
* @param r KDF result
* @param n RSA modulus of the public key
*/
-function rsaGcdValidate(r: bigint.BigInteger, n: bigint.BigInteger) {
+function rsaGcdValidate(r: bigint.BigInteger, n: bigint.BigInteger): void {
const t = bigint.gcd(r, n);
if (!t.equals(bigint.one)) {
throw Error("malicious RSA public key");