十分专业的分享,在此我忍不住分享一下base64的方式:

    s plaintext ="你好,世界!"

    w "加密前:"_plaintext,!

    #; 加密

    Set text=$ZCONVERT(plaintext,"O","UTF8")

    Set text=$SYSTEM.Encryption.AESCBCEncrypt(text,"1234567891234567","1234567891234567")

    Set ciphertext=$SYSTEM.Encryption.Base64Encode(text)

    w "加密后:"_ciphertext,!

    #; 解密

    Set text=$SYSTEM.Encryption.Base64Decode(ciphertext)

    Set text=$SYSTEM.Encryption.AESCBCDecrypt(text,"1234567891234567","1234567891234567")

    Set plaintext=$ZCONVERT(text,"I","UTF8")

    w "解密后:"_plaintext,!

关注者:
正在关注:
Global Masters 徽章: