修复解密问题

This commit is contained in:
lyswhut 2023-04-16 02:03:17 +08:00
parent 37929cf332
commit d50b70aba7
3 changed files with 1 additions and 8 deletions

View File

@ -15,7 +15,7 @@ export const aesEncrypt = (text: string, b64Key: string) => {
export const aesDecrypt = (text: string, b64Key: string) => {
// const decipher = createDecipheriv('aes-128-ecb', Buffer.from(key, 'base64'), '')
// return Buffer.concat([decipher.update(Buffer.from(text, 'base64')), decipher.final()]).toString()
return aesDecryptSync(btoa(text), b64Key, '', AES_MODE.ECB_128_NoPadding)
return aesDecryptSync(text, b64Key, '', AES_MODE.ECB_128_NoPadding)
}
export const rsaEncrypt = (buffer: Buffer, key: string): string => {

2
src/types/app.d.ts vendored
View File

@ -73,5 +73,3 @@ declare global {
}
// var process: Process
}
export {}

View File

@ -1,5 +0,0 @@
// declare module 'crypto' {
// import crypto from 'react-native-quick-crypto'
// export default crypto
// }