React native secureTextEntry没有散列我的密码
当我在我的应用程序中输入pin密码时,它会显示数字,而不会对它们进行散列。secureTextEntry是密码加密的正确属性还是有其他属性 SetPinScreen.js:React native secureTextEntry没有散列我的密码,react-native,password-encryption,React Native,Password Encryption,当我在我的应用程序中输入pin密码时,它会显示数字,而不会对它们进行散列。secureTextEntry是密码加密的正确属性还是有其他属性 SetPinScreen.js: return ( <View style={{width: 250, height: 170, backgroundColor: Colors.trans, alignItems: 'center'}}> <Text style={{fontSize: 20, tex
return (
<View style={{width: 250, height: 170, backgroundColor: Colors.trans, alignItems: 'center'}}>
<Text style={{fontSize: 20, textAlign: 'center', color: this.props.color}}>{this.props.title}</Text>
<TextInput
ref={"pinTextField"}
maxLength={4}
clearTextOnFocus={true}
style={{fontFamily: 'Roboto', width: 160, height: 100, borderBottomWidth: this.props.showUnderline === true?1:0, borderBottomColor: this.props.color, fontSize: 60, textAlign: 'center', color: this.props.color}}
value={this.state.inputCode}
clearTextOnFocus={true}
autoFocus={true}
secureTextEntry={true}
keyboardType={"phone-pad"}
onBlur={this.onKeepKeyboardVisible}
autoCorrect={false}
autoCapitalize={"sentences"}
caretHidden={true}
underlineColorAndroid='transparent'
onChangeText={(text) => this.handleTextChange(text)}/>
<Text style={{fontSize: 16, textAlign: 'center', color: Colors.red}}>{this.state.errorMsg}</Text>
</View>
);
返回(
{this.props.title}
this.handleTextChange(text)}/>
{this.state.errorMsg}
);
如果使用keyboardType={“电话键盘”}
删除keyboardType,它将正常工作secureTextEntry-如果为true,文本输入将隐藏输入的文本,以便密码等敏感文本保持安全。默认值为false。它不适用于multiline={true}。您使用的是什么版本的react native?这是一个错误:版本为0.55。4@riwu你说的臭虫是什么意思?一般臭虫?RN臭虫。您必须等待修复,删除
keyboardType=“phone pad”
,或实施您自己的文本审查。