Skip to content

Commit

Permalink
feat: crypto refactored... removed crypto-js
Browse files Browse the repository at this point in the history
  • Loading branch information
ohager committed Jun 2, 2024
1 parent a95f670 commit a26ad91
Show file tree
Hide file tree
Showing 41 changed files with 709 additions and 422 deletions.
23 changes: 23 additions & 0 deletions packages/core/src/address/convertPublicKeyToNumericId.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Original work Copyright (c) 2018 PoC-Consortium
* Modified work Copyright (c) 2019 Burst Apps Team
* Modified work Copyright (c) 2024 Signum Network
*/

import {base32Length, cwmap, alphabet, initialCodeword} from './internal';
import {} from "@signumjs/crypto"
import {convertHexStringToDecString} from '@signumjs/util';

/**
* @internal
* Converts hexadecimal public key into numeric Id
* @param address The Reed-Solomon address
* @return The numeric id, or undefined if address is invalid
* @module core
*/
export const convertPublicKeyToNumericId = (publicKey: string): string => {

// FIXME:

return ""
};
4 changes: 2 additions & 2 deletions packages/core/src/api/__tests__/e2e/messageApi.spec.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {loadEnvironment} from './helpers/environment';
import {ChainService} from '../../../service/chainService';
import {decryptMessage, generateMasterKeys, getAccountIdFromPublicKey, Keys} from '@signumjs/crypto';
import {decryptMessage, generateMasterKeys, getAccountIdFromPublicKey, SignKeys} from '@signumjs/crypto';
import {getTransaction} from '../../factories/transaction/getTransaction';
import {isAttachmentVersion} from '../../../attachment';
import {sendEncryptedMessage, sendMessage} from '../../factories/message';
Expand All @@ -12,7 +12,7 @@ describe('[E2E] Message Api', () => {

let environment;
let service;
let senderKeys: Keys;
let senderKeys: SignKeys;
let recipientKeys;
let recipientId;

Expand Down
12 changes: 7 additions & 5 deletions packages/crypto/.bilirc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ module.exports = {
plugins: {
commonjs: {
namedExports: {
'crypto-js': [
'enc',
'SHA256',
'AES',
'lib'
'crypto': [
'subtle',
'getRandomValues'
],
'pako': [
'inflate',
'gzip'
]
}
}
Expand Down
Loading

0 comments on commit a26ad91

Please sign in to comment.