HomeiOS Developmentandroid - Drawback producing MD5 of recordsdata on iOS utilizing React Native

android – Drawback producing MD5 of recordsdata on iOS utilizing React Native


I’ve a query, I am growing a react native software for android and ios, on this software there’s a code to get the md5 of a picture, which the backend checks after I submit a picture, the issue is that in android the md5 is generated accurately and the backend accepts it, however in ios it generates in another way, being the identical code, does anybody know why?

import RNFS from 'react-native-fs';

export const generateMd5 = async (path: string) => {
  strive {
    const caminhoExiste = await RNFS.exists(path);
    console.log(caminhoExiste)
    if (!caminhoExiste) throw new Error("not exist " + path);

    const hashMD5 = await RNFS.hash(path, 'md5');
    return hashMD5;
  } catch (error) {
    throw new Error(error as string);
  }
};

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments