在React Native中,你可以使用第三方库来实现SHA256加密 首先,你需要安装这个库。在你的React Native项目中,打开终端并运行以下命令: 代码语言:javascript 复制 npm install --save react-native-sha256 或者,如果你使用的是Yarn: 代码语言:javascript 复制 yarn add react-native-sha256...
import{sha256,sha256Bytes}from'react-native-sha256'; Build a sha256-hash: sha256("Test").then(hash=>{console.log(hash);}) constmessage=newUint8Array(8);constbytes=Array.from(message);sha256Bytes(bytes).then(hash=>{console.log(hash);}) ...
$ yarn add react-native-pinning-ssl Get SHA-256 key Usage import{isSSLValid}from"react-native-pinning-sha256";asyncfunctionrunSSLPinning(){try{constresult=awaitisSSLValid({url:"https://github.com/",hashes:["CA 06 F5 6B 25 8B 7A 0D 4F 2B 05 47 09 39 47 86 51 15 19 84"],domain...
import{sha256,sha256Bytes}from'react-native-sha256'; Build a sha256-hash: sha256("Test").then(hash=>{console.log(hash);}) constmessage=newUint8Array(8);constbytes=Array.from(message);sha256Bytes(bytes).then(hash=>{console.log(hash);}) ...
movibe / react-native-pinning-sha256 Public Notifications Fork 1 Star 0 Code Issues Pull requests Actions Projects Security Insights Labels Milestones 9 labels Sort bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull ...