Skip to content

Conversation

smiller-coti
Copy link
Collaborator

No description provided.

signature: new Array<Uint8Array>
}

for (let i = 0; i < encodedStr.length / 8; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider changing the loop

functionSelector: string
) {
// consider improving address validation
if (plaintext.substring(0, 2) !== '0x' || plaintext.length !== 42) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you consider using
const { utils } = require('ethers')
utils.isAddress(address)

functionSelector
)

const inputText = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should enhance it to a datatype of some ciphered address to manage the 3 parts away from the user

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean something like this?


export function decryptString(ciphertext: Array<bigint>, userKey: string): string {
let decryptedStr = new Array<number>(ciphertext.length)
export function decryptString(ciphertext: { value: bigint[] }, userKey: string): string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure on this code with the #18 changes - we need to review final look

@smiller-coti smiller-coti force-pushed the smiller-coti/ctAddress branch 2 times, most recently from 4fdc8ea to 50ade23 Compare September 25, 2024 09:12
// We use 8 bytes since we will use ctUint64 to store
// each chunk of 8 characters
for (let i = 0; i < encodedStr.length; i += EIGHT_BYTES) {
const startIdx = i
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment i guess some how it is the same change?

@smiller-coti smiller-coti force-pushed the smiller-coti/ctAddress branch 2 times, most recently from 968ccda to e8aac4d Compare September 29, 2024 06:30
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants