Lasso Soft Inc. > Home

[ Encrypt_BlowFish ]

Method

[Encrypt_BlowFish] encrypts a string.

Accepts two parameters, a string to be encrypted and a -Seed keyword with the key or password for the encryption. Ideally, the -Seed should be a long phrase rather than a simple password. The exact same -Seed must be used when decrypting the text using [Decrypt_BlowFish].

If the seed is forgotten there is no way to retrieve the original value of the encrypted text.

Note: The BlowFish methods are not binary-data safe. The encrypted string will be truncated at the first null character. To encrypt binary data first pass it through the [Encode_Base64] or [Encode_UTF8] method.

The [Encrypt_BlowFish] method returns a [bytes] type.

  • Syntax
Encrypt_BlowFish(-Seed='Password', 'Encrypt Value')
Examples
  • Beginner

To encrypt a string using the BlowFish algorithm:

Use the [Encrypt_BlowFish] method with a long -Seed argument. The following method encrypts a phrase using a whimsical -Seed argument.

Note the method returns a bytes type. The encodeHex method is performed on the result to return a URL-safe result.

Code

Encrypt_Blowfish( 
    -Seed='I sell rhino fertilizer down by the sea shore!', 
    'The quick brown fox jumped over the running rhino.'
)->encodeHex

Result

CBD790AF71235BA2051D6A37B0AB8FF4F7B492E40731C7ACB5597CC5939C084F64B2589D3BC3E8D4DE61740C859020FA231E4D6672BF2E48AA

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft