As much as you're being downvoted and attacked, you've nearly reinvented *bcrypt*.

> Let's say we have encryption algorithm (doesn't matter which one):

**blowfish**


> Then generate random sequence of chars consisting predefined array (for instance just random sequence of digits)

A sequence of 24 characters; an even multiple of the 8-byte blocksize of blowfish:

`OrpheanBeholderScryDoubt`

> Encrypt sequence with our algorithm with given password and store it somewhere in safe place (let's call it as saved value)

The password needs to be transformed into a 72-byte encryption key - the key size of blowfish. Bcrypt does this with a function called **`ExpensiveKeySetup`**:

    Int32 costFactor = 12;
    Byte [16] salt = CryptGenRandom(16);
    Byte[72] key = ExpensiveKeySetup(password, salt, costFactor);

And in fact, bcrypt encrypts the sequence 64 times:

    Byte[24] ciphertext = BytesOf("OrpheanBeholderScryDoubt");
    for int i = 1 to 64 do
       ciphertext = BlowfishEncrypt(cipherText, ref key);

And now you have your stuff to store:

- costFactor
- salt
- ciphertext

Bcrypt coverts the salt and ciphertext to base64, and gives you a string:

> $2b$[costFactor]$[salt][ciphertext]

Such as:

  
   $2a$12$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa

> Now time to check password validity
> 
> Try to decrypt saved value with probe password

Rather than decrypt, just repeat the encryption of the same fixed starting value, with the password, and the same salt. And compare the result to what you stored.

It would be nice if the community was nice, helpful, or knowledgeable - rather than just attacking or using cliches.