aboutsummaryrefslogtreecommitdiffstats
path: root/backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
diff options
context:
space:
mode:
Diffstat (limited to 'backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js')
-rw-r--r--backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js b/backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
deleted file mode 100644
index 9fe67ac..0000000
--- a/backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict';
-
-function getParamSize(keySize) {
- var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1);
- return result;
-}
-
-var paramBytesForAlg = {
- ES256: getParamSize(256),
- ES384: getParamSize(384),
- ES512: getParamSize(521)
-};
-
-function getParamBytesForAlg(alg) {
- var paramBytes = paramBytesForAlg[alg];
- if (paramBytes) {
- return paramBytes;
- }
-
- throw new Error('Unknown algorithm "' + alg + '"');
-}
-
-module.exports = getParamBytesForAlg;