MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / handleEncrypt

Function handleEncrypt

src/app/encrypt/Encrypt.js:129–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 }
128
129 async handleEncrypt() {
130 this.setState(prevState => ({defaultPlainText: prevState.message, waiting: true}));
131 if (this.state.files.length > 0) {
132 await this.encryptFiles(this.state.files, this.state.recipients);
133 }
134 if (this.state.message !== '') {
135 await this.encryptMessage(this.state.message, this.state.recipients);
136 }
137 this.setState({waiting: false});
138 }
139
140 handleBack() {
141 this.setState(prevState => ({encrypted: [], recipients: [...prevState.recipients]}));

Callers

nothing calls this directly

Calls 3

encryptFilesMethod · 0.80
setStateMethod · 0.45
encryptMessageMethod · 0.45

Tested by

no test coverage detected