Key Generation – How do I program a function to generate a secure encryption key for block ciphers?

I am currently studying the most popular encryption algorithms and methods. For practical reasons, I am currently pursuing a project in which I simply implement everything from ECB to RSA as a kind of C crypto library.
I wanted to ask how I would generate a more or less secure key in a C program (I know that writing a crypto library alone is not at all secure, but I just want to learn the basic principles from key generation to key exchange encryption mechanisms).
How could I approach the problem of implementing a secure key generation algorithm? Which main problems need to be considered in order to achieve at least mediocre key security?

7 – How do I know when another contributed module deletes a block?

I've written a Drupal 7 module that adds about ten fields to the block management configuration form and stores the values ​​for those fields in its own database table. My module does not build blocks, but extends the functionality of a block, no matter which module it created.

My module should delete the data in a separate table, though any Module deletes a block from the block Table. How would my module know when this happens? Is there a hook or other "universal" method to know when a block was deleted?

There is none hook_block_delete()although there is hook_node_delete() and hook_entity_delete(),
I've looked at development guides to build blocks for some clues, but none of them found any examples of how they should be deleted. I also looked at the source code of modules that create / delete blocks, like the Views module, but I can not say how or if they send a notification that they have deleted a block.

7 – How do I delete block data from the table of the module I have created?

I've written a Drupal 7 module that adds about ten fields to the block management configuration form and stores the values ​​for those fields in its own database table. My module does not build blocks, but extends the functionality of a block, no matter which module it created.

I want my module to erase the data in its own table when a module erases a block block Table. Is there a hook or other "universal" method to know when a block was deleted?

There does not seem to be one hook_block_delete()although there is hook_node_delete() and hook_entity_delete(),
I've looked at development guides to build blocks for some clues, but none of them found any examples of how they should be deleted. I also looked at the source code of modules that create / delete blocks, like the Views module, but I can not say how or if they send a notification that they have deleted a block.

Drupal 7 Hook, if another module deletes a block

I've written a Drupal 7 module that adds about ten fields to the Block Administrator configuration form and stores the values ​​for those fields in a separate database table.
My module does not build blocks, but extends the functionality of a block, no matter which module it created.
I would like my module to delete the data in its own table when a module deletes a block from the list. "block" Table.
Is there a hook or other "universal" method to know when a block was deleted?

There does not seem to be one hook_block_deletealthough there is hook_node_delete. hook_entity_delete. hook_taxonomy_vocabulary_delete, etc.
I've looked at development guides to build blocks for some clues, but none of them found any examples of how they should be deleted.
I also looked at the source code of modules that create / delete blocks, such as: For example, I can not tell you how or if they send a notification that they have deleted a block.

Do Facebook and Twitter block or monetize copyrighted content?

Are Facebook and Twitter currently monetizing or blocking copyrighted content? (such as music used as background in a video).

If you search on Google, only old messages (two to three years ago) about how Facebook is going to start with how Facebook is developing its own Content ID system or how Facebook is negotiating with music labels, but nothing about current policies.

linux – nginx fastcgi cache in another location block

I'm trying to cache another location with a different cache key zone, but it's not working. The cache only works for the root location "/".

If I turn off the cache for location "/", it still does not work for a different location.

HTTP block:

fastcgi_cache_path /webcache/nginx levels=1:2 keys_zone=microcache:100m max_size=1000m inactive=45m use_temp_path=off;
fastcgi_cache_path /webcache/extreme levels=1:2 keys_zone=extreme:100m max_size=10400m inactive=99999m use_temp_path=off;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

Server Block:

location ~* "^/(20(0-1)(0-8)/)" {              
   try_files $uri $uri/ /index.php?$args;
    location ~ .php$ {
        try_files $uri = 404;
        fastcgi_split_path_info ^(.+.php)(/.+)$;
        fastcgi_pass unix:/var/opt/remi/php56/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors on;
        fastcgi_cache_key "$scheme$request_method$host$request_uri";
        fastcgi_no_cache $no_cache;
        fastcgi_cache_bypass $no_cache;
        fastcgi_cache extreme;
        fastcgi_cache_min_uses 1;
        fastcgi_cache_methods GET HEAD;
        fastcgi_cache_lock on;
        fastcgi_cache_lock_age 5s;
        fastcgi_cache_lock_timeout 5s;
        fastcgi_cache_valid 200 302 301 8760h;
        fastcgi_cache_valid 500 502 10s;
        fastcgi_cache_valid 403 404 10s;
        fastcgi_cache_use_stale updating error timeout invalid_header http_500;
        fastcgi_cache_background_update on;
        fastcgi_pass_header Set-Cookie;
        fastcgi_pass_header Cookie;

}

location / {
 try_files $uri $uri/ /index.php?$args;
}


     location ~ .php$ {
        try_files $uri = 404;
        fastcgi_split_path_info ^(.+.php)(/.+)$;
        fastcgi_pass unix:/var/opt/remi/php56/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_intercept_errors on;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_no_cache $no_cache;
    fastcgi_cache_bypass $no_cache;
    fastcgi_cache microcache;
    fastcgi_cache_min_uses 1;
    fastcgi_cache_methods GET HEAD;
    fastcgi_cache_lock on;
    fastcgi_cache_lock_age 5s;
    fastcgi_cache_lock_timeout 5s;
    fastcgi_cache_valid 200 302 301 1m;
    fastcgi_cache_valid 500 502 10s;
    fastcgi_cache_valid 403 404 10s;
    fastcgi_cache_use_stale updating error timeout invalid_header http_500;
    fastcgi_cache_background_update on;
    fastcgi_pass_header Set-Cookie;
    fastcgi_pass_header Cookie;
    fastcgi_ignore_headers Cache-Control Expires Set-Cookie;


        }

Missing log block for the availability database in SQL Server 2016

I recently started receiving notifications like these:

Always On Availability Groups Transport encountered a missing log block for the availability database myDb. The LSN of the most recently used log block is (xxxx: xxxxxxx: x). Log search is restarted to resolve the problem. This is just an informational message. No user action is required.

It should have been fixed in SQL Server 2016 SP2 CU 2 after this article. My environment is SQL Server 2016 SP2 CU7, so I do not understand why I see that. Does anyone know why this could be the case, or is anything feasible apart from opening an MS support ticket?

Blockchain – PivX Fork | After the last PoW block, PoS (proof of stake) will not be activated [Developer]

I played with my tenth fork (never released), this time it's PivX.

My mission is to exam the proof-of-work segment and the Proof-of-Stake segment.

After completing the proof-of-work cycle until the variable "nLastPOWBlock" in chainparams.cpp, line: 118.

Enter image description here

I'm trying to find all variables related to proof-of-stake activation

Enter image description here

  1. Valid time = true
  2. Peer relationships = true
    Enter image description here
  3. Purse unlocked = true
  4. Mintable / enough credits = true
    Enter image description here
  5. Master node synchronized = true

Enter image description here

  1. Stakeout Status = not correct

So my question is this: are members here familiar with PivX enough to know what's needed to activate the proof-of-stake segment when PoW is over?

Enter image description here