Skip to main content

installed

Function installed 

Source
pub fn installed() -> Result<Encryptor>
Expand description

The installed encryptor.

§Errors

Error::Internal when none is installed: the Worker has no valid SECRET_KEY_BASE (the message names the fix), or native code did not call install.

§Examples

use ocre::encryption::{self, Encryptor};

encryption::install(Encryptor::new(&"t".repeat(64), &[]).unwrap());
assert!(encryption::installed().is_ok());