+/* fetches values from the input fields, decomposes each input string into several shares and reconstructs the original code/char for each position */
+function decode(){
+ var shares_list=collect(); // fetch shares
+ var ascii=getElement('ascii');
+ var result=getElement('result');
- var ascii=document.getElementById('ascii');
ascii.innerHTML='ascii: ';
result.innerHTML='Passphrase: ';
ascii.innerHTML='ascii: ';
result.innerHTML='Passphrase: ';
-
+ var codeCount = numberOfCodesIn(shares_list);
for (var codeIndex = 0; codeIndex<codeCount; codeIndex++){
shares_for_code = [];
for (var codeIndex = 0; codeIndex<codeCount; codeIndex++){
shares_for_code = [];
- for (var share_index=0; share_index<shares_list.length; share_index++){
- var share_number = shares_list[share_index].share_number;
- var share = shares_list[share_index].parts[codeIndex];