public static function MultiKeyWrapper::encrypt in Lockr 7.3
Same name and namespace in other branches
- 7.2 vendor/lockr/lockr-client/src/KeyWrapper/MultiKeyWrapper.php \Lockr\KeyWrapper\MultiKeyWrapper::encrypt()
Encrypt the given plaintext.
Parameters
string $plaintext:
string|null $key:
Return value
array
Overrides KeyWrapperInterface::encrypt
1 call to MultiKeyWrapper::encrypt()
- Lockr::createSecretValue in vendor/
lockr/ lockr/ src/ Lockr.php - Creates a secret value by name.
File
- vendor/
lockr/ lockr/ src/ KeyWrapper/ MultiKeyWrapper.php, line 29
Class
Namespace
Lockr\KeyWrapperCode
public static function encrypt($plaintext, $key = null) {
foreach (self::$wrappers as $wrapper) {
if ($wrapper::enabled()) {
return $wrapper::encrypt($plaintext, $key);
}
}
return false;
}