建立 AES 加密
動詞:cipherAes
可用來源: <Standard>
使用加密金鑰及向量,建立 AES(進階加密標準)加密。
語法
cipherAes --key(String) --iv(String) (Boolean)=success (Cipher)=value
輸入
Script | 設計工具 | 必要 | AcceptedTypes | 說明 |
---|---|---|---|---|
--key | 按鍵 | 必要 | 文字 | AES 加密中使用的金鑰。輸入的金鑰必須為 AES 加密標準,金鑰有下列大小可用: |
--iv | 起始設定向量 | 必要 | 文字 | 加密使用的起始設定向量,與金鑰 互補。它的長度應該一律為 16 個字元。 |
輸出
Script | 設計工具 | AcceptedTypes | 說明 |
---|---|---|---|
成功 | 順利完成 | 布林值 | 如果正確地建立加密則傳回 "True",反之則傳回 "False"。 |
值 | AES 密碼 | 密碼 | 傳回包含所建立之 AES 加密的「密碼」變數。 |
範例
建立 AES 加密,並通知是否已順利建立加密。
defVar --name success --type Boolean
defVar --name aesCipher --type Cipher
// Create AES encryption with key = "as@.@#XDilfontyl" and iv = "qwerasdzxc.kjsnv"
cipherAes --key "as@.@#XDilfontyl" --iv "qwerasdzxc.kjsnv" success=success aesCipher=value
logMessage --message "${success}" --type "Info"
// Execution returns the following output:
// True