互換性 Unicode 組み込み関数 - Decrypt メソッド

TEA アルゴリズムを使って文字列を解読します

互換性 Unicode 組み込み関数 (PRIM_LIBI.ICompatibleUnicodeIntrinsics) のメンバ

パラメーター

名前タイプデータ タイプ記述
Result*Result (任意)Unicode 文字列結果の解読された文字列
Key*InputUnicode 文字列値の解読に使用されるキー

詳細

Decrypt メソッドは、最大 16 バイト (128ビット) のキーを使用して、指定された値を復号化します。
 
このキーは、最初の encryptionで使用されたキーに対応する必要があります。

この例では、入力された値が暗号化され、元のキーと誤ったキーを使用して復号化されます。
 
使用されている間違ったキーの結果は解読不能です。
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#xDemoTheme)
   Define_Com Class(#xDemoAlpha256.Visual) Name(#Value) Displayposition(5) Left(16) Parent(#COM_OWNER) Tabposition(1) Top(88) Height(25) Width(769) Caption('Text to Encrypt') Labeltype(Caption)
   Define_Com Class(#xDemoAlpha256.Visual) Name(#Key) Displayposition(1) Left(16) Parent(#COM_OWNER) Tabposition(2) Top(120) Height(25) Width(769) Caption('Encryption Key') Labeltype(Caption)
   Define_Com Class(#xDemoAlpha256.Visual) Name(#EncryptedValue) Displayposition(4) Left(16) Parent(#COM_OWNER) Tabposition(5) Top(168) Height(25) Width(769) Caption('Encrypted Value') Labeltype(Caption) Readonly(True)
   Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Enter a value and key to see the encrypted value') Displayposition(6) Ellipses(Word) Height(66) Left(8) Parent(#COM_OWNER) Tabposition(6) Tabstop(False) Top(7) Verticalalignment(Center) Width(793) Themedrawstyle('DarkTitle+Heading1') Alignment(Center)
   Define_Com Class(#xDemoAlpha256.Visual) Name(#DecryptedValue) Displayposition(3) Left(16) Parent(#COM_OWNER) Tabposition(4) Top(200) Height(25) Width(769) Caption('Decrypted Value') Labeltype(Caption) Readonly(True)
   Define_Com Class(#xDemoAlpha256.Visual) Name(#FailedDecryption) Displayposition(2) Left(16) Parent(#COM_OWNER) Tabposition(3) Top(232) Height(25) Width(769) Caption('Failed Decryption') Labeltype(Caption) Readonly(True)
 
   Evtroutine Handling(#Value.Changed #Key.Changed)
 
      #EncryptedValue := #Value.Encrypt( #Key )
 
      #DecryptedValue := #EncryptedValue.Decrypt( #Key )
      #FailedDecryption := #EncryptedValue.Decrypt( "XXX" )
 
 Endroutine
 
 End_Com

参照

すべてのコンポーネント クラス

テクニカルリファレンス

2018 - V14SP1