Sample code for 30+ languages & platforms
DataFlex

Example: SecureString.HashVal method

Demonstrates the HashVal method.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoStr
    String sEncodedHash

    Move False To iSuccess

    Get Create (RefClass(cComChilkatSecureString)) To hoStr
    If (Not(IsComObjectCreated(hoStr))) Begin
        Send CreateComObject of hoStr
    End
    Set ComMaintainHash Of hoStr To "sha256"
    Get ComAppend Of hoStr "Hello World" To iSuccess

    Get ComHashVal Of hoStr "base64" To sEncodedHash
    Showln sEncodedHash


End_Procedure