Sample code for 30+ languages & platforms
Tcl

Workaround for the deprecated Crypt2.OpaqueVerifyBytesENC method

Shows how to replace the deprecated OpaqueVerifyBytesENC method. (Chilkat is moving away from the use of CkByteData.)

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set crypt [new_CkCrypt2]

CkCrypt2_put_EncodingMode $crypt "base64"

# ------------------------------------------------------------------------
# The OpaqueVerifyBytesENC method is deprecated:

set outData [new_CkByteData]

set success [CkCrypt2_OpaqueVerifyBytesENC $crypt "base64 encoded p7m" $outData]

# ------------------------------------------------------------------------
# Workaround.
# (Chilkat is moving away from using CkByteData)

set bd [new_CkBinData]

CkBinData_AppendEncoded $bd "base64 encoded p7m" "base64"

# If the opaque signature is validated, the contents of bd are replaced with the original data that was signed.
# 
set success [CkCrypt2_OpaqueVerifyBd $crypt $bd]

delete_CkCrypt2 $crypt
delete_CkByteData $outData
delete_CkBinData $bd