On Tue, 20 Oct 2009, Massimo Belgrano wrote:

Hi,

> Possible a sample

You have everything in ChangeLog file:

    + added PRG functions for BlowFish encryption:
         hb_blowfishKey( <cPass> ) -> <bfKey>
         hb_blowfishEncrypt( <bfKey>, <cData> ) -> <cCryptedData>
         hb_blowfishDecrypt( <bfKey>, <cCryptedData> ) -> <cData>

so the example seems the be rather trivial peace of code:


   proc main()
      local cText, cEncrypted, cDecrypted, cPass, bfKey

      cText := "This is my secret message."

      cPass := "Top Secret ;-)"
      bfKey := hb_blowfishKey( cPass )

      /* encrypt data */
      cEncrypted := hb_blowfishEncrypt( bfKey, cText )

      /* dencrypt data */
      cDecrypted := hb_blowfishDecrypt( bfKey, cEncrypted )

      ? "plain text:", hb_strToExp( cText )
      ? " encrypted:", hb_strToExp( cEncrypted )
      ? " decrypted:", hb_strToExp( cDecrypted )
   return


best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to