original_string: protected function set_key($key) {
          $bytes = strlen($key); // Get key length in bytes.
  
          // Only accept keys with the expected (backup::CIPHERKEYLEN) key length. There are a number of hashing,
          // random generators to achieve this esasily, like the one shown below to create the default
          // site encryption key and ivs.
          if ($bytes !== backup::CIPHERKEYLEN) {
              $info = (object)array('expected' => backup::CIPHERKEYLEN, 'found' => $bytes);
              throw new base_element_struct_exception('encrypted_final_element incorrect key length', $info);
          }
          // Everything went ok, store the key.
          $this->key = $key;
      }
code: protected function set_key($key) {
          $bytes = strlen($key); // Get key length in bytes.
  
          // Only accept keys with the expected (backup::CIPHERKEYLEN) key length. There are a number of hashing,
          // random generators to achieve this esasily, like the one shown below to create the default
          // site encryption key and ivs.
          if ($bytes !== backup::CIPHERKEYLEN) {
              $info = (object)array('expected' => backup::CIPHERKEYLEN, 'found' => $bytes);
              throw new base_element_struct_exception('encrypted_final_element incorrect key length', $info);
          }
          // Everything went ok, store the key.
          $this->key = $key;
      }
code_tokens: protected function set_key ( $ key ) { $ bytes = strlen ( $ key ) ; // Get key length in bytes. // Only accept keys with the expected (backup::CIPHERKEYLEN) key length. There are a number of hashing, // random generators to achieve this esasily, like the one shown below to create the default // site encryption key and ivs. if ( $ bytes !== backup :: CIPHERKEYLEN ) { $ info = ( object ) array ( 'expected' => backup :: CIPHERKEYLEN , 'found' => $ bytes ) ; throw new base_element_struct_exception ( 'encrypted_final_element incorrect key length' , $ info ) ; } // Everything went ok, store the key. $ this -> key = $ key ; }
docstring: Set the encryption key manually, overriding default backup_encryptkey config.
  
  @param string $key key to be used for encrypting. Required to be 256-bit key.
  Use a safe generation technique. See self::generate_encryption_random_key() below.
docstring_tokens: Set the encryption key manually overriding default backup_encryptkey config .