Skip to content

Commit

Permalink
Fix suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 10, 2024
1 parent 6eeef1e commit 42c8aac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions holo-key-manager-extension/src/lib/helpers/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ const calcDhtBytes = (data: Uint8Array): Uint8Array => {

export const extendUint8Array = (inputArray: Uint8Array): Uint8Array => {
const prefix = new Uint8Array([132, 32, 36]);
const combinedArray = new Uint8Array([...prefix, ...inputArray]);
const suffix = calcDhtBytes(combinedArray);
const suffix = calcDhtBytes(inputArray);

return new Uint8Array([...combinedArray, ...suffix]);
return new Uint8Array([...prefix, ...inputArray, ...suffix]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,18 @@ export function createSignInWithKeyMutation(queryClient: QueryClient) {

const currentAuthenticatedAppsListData = await fetchAuthenticatedAppsList();

const newIndex = currentAppsList.findIndex(
const index = currentAppsList.findIndex(
(app) => app.happId === happId && app.keyName === keyName
);

const pubKey = await deriveSignPubKey(newIndex);
const pubKey = await deriveSignPubKey(index);

storageService.set({
key: AUTHENTICATED_APPS_LIST,
value: {
...currentAuthenticatedAppsListData,
[happId]: {
index: newIndex,
index: index,
origin
}
},
Expand Down
2 changes: 1 addition & 1 deletion holo-key-manager-extension/static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Holo key manager",
"description": "A browser extension to manage holo keys",
"version": "0.0.67",
"version": "0.0.68",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiAtKvbHNTN3O2BLRZH7RkLczaMLenSeZu+YP+KomPQPZ18nt4DY9boIN/+GWts7gCzEeQq59l8edGdF2P7xAbsRxYR88+zFEbxMtIyfyqJZIlzXwnvPJkwGu/S6arNtX48K7q1+xnJEE7VyeYSj6/i2LR+LmPigCzY9JCP7+SmWVeYbdm3kZmReK0ecfh15RXSNjZpXJUgrbea/RVxweggYKnmhhOUBmuJSCLoWTXIuJPBMwGQK1O2GKBqHOq94bPVSF7j+4WzSpPan70ZZJX/reFsOFE/idfFN6wbizjR1Ne50Po03kudEmfQgoqUhVpd0wP8A3YbqE7ODdZcCPPwIDAQAB",
"manifest_version": 3,
"action": {
Expand Down

0 comments on commit 42c8aac

Please sign in to comment.