Files
inji-wallet/shared/commonUtil.ts
Tilak Puli ec9fd9f6d9 Inji-344: Refactoring VC Key (#798)
* feat(inji-344): Use VC Key class instead of separate functions for managing vc key

* feat(inji-344): Use properties from VcKey Class instead of reading from vckey string

* feat(inji-344): Rename vcKey to vcMetadata

* feat(inji-344): Use vc's unique id or vckey instead of joined string of vc metadata

* feat(inji-344): Use vc key instead of unique id to avoid confusion. Fix issues reg parsing vc metadata

* feat(inji-344):fix redownloading issue

Co-authored-by: Tilak <tilakpuli15@gmail.com>

* feat(inji-344): Remove vc getting stored on update of pin status

* feat(inji-344): update other vc's pin status to false when any vc is pinned

* feat(inji-344): remove hash ID for UIN

* feat(inji-344): revert google services json

* feat(inji-344): remove mmkv logs added for debugging

* feat(inji-344): fix received vcs not getting displayed on reopen of app

* feat(inji-344): fix id not shown in revoke component

---------

Co-authored-by: Sri Kanth Kola <srikanthsri7447@gmail.com>
2023-09-20 16:51:59 +05:30

26 lines
570 B
TypeScript

import {Platform} from 'react-native';
import argon2 from 'react-native-argon2';
export const hashData = async (
data: string,
salt: string,
config: Argon2iConfig,
): Promise<string> => {
const result = await argon2(data, salt, config);
return result.rawHash as string;
};
export interface Argon2iConfig {
iterations: number;
memory: number;
parallelism: number;
hashLength: number;
mode: string;
}
export default function testIDProps(id) {
return Platform.OS === 'android'
? {accessible: true, accessibilityLabel: id}
: {testID: id};
}