android-components / mozilla.components.lib.dataprotect / Keystore / encryptBytes

# encryptBytes

`fun encryptBytes(plain: ByteArray): ByteArray` (source)

Encrypts data using the managed key.

The output of this method includes the input factors (i.e., initialization vector), ciphertext, and authentication tag as a single byte string; this output can be passed directly to decryptBytes.

### Parameters

`plain` - The "plaintext" data to encrypt

Return
The encrypted data to be stored