User bio
404 bio not found
Member since Aug 14, 2017
Replies:

ok, sorry guys was on a brief vacation.  

The C# console shows this:

stringkey: Svp3r_S3cr3t_K3y_F0r_t3st1ng_AST
stringvector: V3ry_r@nd0m_1n1t
stringToEncrypt: ad=snoopy&m=123456789&datetime=
Temp Vector 64: VjNyeV9yQG5kMG1fMW4xdA==
​Encrypted: VgBqAE4AeQBlAFYAOQB5AF0OfBtivy19pV1vc5oNZ5supNdtQ0yrZ70V5GS9iFmbcQHwdL37LND0ugFFYekwwg==

 

However the Cache

xaes() ;
    ;
    n
    s stringToEncrypt="ad=snoopy&m=123456789&datetime="
    s stringKey="Svp3r_S3cr3t_K3y_F0r_t3st1ng_AST" ;
    s stringvector="V3ry_r@nd0m_1n1t" ;
    ;
    s key=$ZCONVERT(stringKey,"O","UTF8") W !,"key: ",?12,key
    s IV=$ZCONVERT(stringvector,"O","UTF8") W !,"IV: ",?12,IV
    s text=$ZCONVERT(stringToEncrypt,"O","UTF8") W !,"text: ",?12,text
    ;
    ;
    s BinaryText=$ZCONVERT(stringvector,"O","UTF8")
    s Base64Encoded=$system.Encryption.Base64Encode($ZCONVERT(stringvector,"O","UTF8")) w !,"Base64Encoded: ",?12,Base64Encoded
    ;
    ;
    s enctext=$SYSTEM.Encryption.AESCBCEncrypt(text,key,IV) w !,"enctext: ",?12,enctext
    s ciphertext=$SYSTEM.Encryption.Base64Encode($ZCONVERT(enctext,"O","UTF8"),1) W !,"ciphertext: ",?12,ciphertext
    ;
    q

will output:

 

key:        Svp3r_S3cr3t_K3y_F0r_t3st1ng_AST
IV:         V3ry_r@nd0m_1n1t
text:       ad=snoopy&m=123456789&datetime=
Base64Encoded: VjNyeV9yQG5kMG1fMW4xdA==
enctext:    ˆúÅbªK·¨–V

ciphertext: y4bDusOFYsKqS8K3wqjigJNWAEPCthjCusOWGsO1Uw1aw5Digqw4VcKkwqzigJkgw6XDpTw=

 

The Base64Encoded and the Temp Vector 64 from C# match.  However if I try to put the Base64Encoded into $SYSTEM.Encryption.AESCBCEncrypt, I get an ILLEGAL VALUE as that function requires UTF8.  It still fails if I convert it to UTF8 before the AESCBCEncrypt.

Certifications & Credly badges:
William has no Certifications & Credly badges yet.
Global Masters badges:
William has no Global Masters badges yet.
Followers:
William has no followers yet.
Following:
William has not followed anybody yet.