You are here

protected static function LockrAes128CtrSha256KeyWrapper::encode in Lockr 7.2

Same name and namespace in other branches
  1. 7.3 vendor/lockr/lockr/src/KeyWrapper/LockrAes128CtrSha256KeyWrapper.php \Lockr\KeyWrapper\LockrAes128CtrSha256KeyWrapper::encode()
1 call to LockrAes128CtrSha256KeyWrapper::encode()
LockrAes128CtrSha256KeyWrapper::encrypt in vendor/lockr/lockr-client/src/KeyWrapper/LockrAes128CtrSha256KeyWrapper.php
Encrypt the given plaintext.

File

vendor/lockr/lockr-client/src/KeyWrapper/LockrAes128CtrSha256KeyWrapper.php, line 139

Class

LockrAes128CtrSha256KeyWrapper

Namespace

Lockr\KeyWrapper

Code

protected static function encode($key, $iv, $hmac_key) {
  $parts = array(
    self::PREFIX,
    base64_encode($key),
    base64_encode($iv),
    base64_encode($hmac_key),
  );
  return implode('$', $parts);
}