@dfns/dfns-key-import-bundler
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -255,2 +255,25 @@ let wasm; | ||
/** | ||
* Converts EdDSA secret key into secret scalar that can be used for key import | ||
* @param {Uint8Array} secret_key | ||
* @returns {SecretScalar} | ||
*/ | ||
export function convertEddsaSecretKeyToScalar(secret_key) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(secret_key, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.convertEddsaSecretKeyToScalar(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return SecretScalar.__wrap(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
function handleError(f, args) { | ||
@@ -257,0 +280,0 @@ try { |
@@ -29,2 +29,8 @@ /* tslint:disable */ | ||
/** | ||
* Converts EdDSA secret key into secret scalar that can be used for key import | ||
* @param {Uint8Array} secret_key | ||
* @returns {SecretScalar} | ||
*/ | ||
export function convertEddsaSecretKeyToScalar(secret_key: Uint8Array): SecretScalar; | ||
/** | ||
* The protocol for which a key can be used. | ||
@@ -31,0 +37,0 @@ */ |
@@ -5,3 +5,3 @@ { | ||
"description": "Cryptography code for importing a key to Dfns", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"license": "MIT OR Apache-2.0", | ||
@@ -8,0 +8,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
346776
715