跳轉到內容

Rebol 程式設計/rsa-encrypt

來自華夏公益教科書,開放的書籍,開放的世界
RSA-ENCRYPT obj data /decrypt /private /padding padding-type 

加密或解密一些資料

RSA-ENCRYPT 是一個原生值。

  • obj -- RSA 金鑰物件(型別:物件)
  • data -- 要加密的資料(型別:二進位制)
  • /decrypt -- 解密資料(預設是加密)
  • /private -- 使用 RSA 私鑰(預設是公鑰)
  • /padding -- 選擇要使用的填充型別
    • padding-type -- 填充型別(型別:單詞 none)

原始碼

[編輯 | 編輯原始碼]
rsa-encrypt: native[
    "Encrypts or decrypts some data" 
    obj [object!] "The RSA key object" 
    data [binary!] "Data to encrypt" 
    /decrypt "Decrypts the data (default is to encrypt)" 
    /private "Uses an RSA private key (default is a public key)" 
    /padding "Selects the type of padding to use" 
    padding-type [word! none!] "Type of padding"
]
華夏公益教科書