secureTextEntry не хэширует мой пароль - PullRequest
0 голосов
/ 23 мая 2018

Когда я набираю свой пин-пароль внутри моего приложения, оно показывает цифры без их хеширования.Является ли secureTextEntry подходящим свойством для шифрования пароля или есть что-то еще?

SetPinScreen.js:

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>
    );

1 Ответ

0 голосов
/ 02 января 2019

это не работает, если вы используете keyboardType={"phone-pad"} remove keyType, и оно будет работать нормально

...