The crypto rsa library - pf-lang/pipefish GitHub Wiki

Modules

big ("/home/runner/work/pipefish/pipefish/source/initializer/libraries/math/big.pf")

Types

GenerateKey = struct (bits int) :

The data to pass to get ... from to generate a key.

PublicKey = struct (modulus Int, exponent int) :

A public key/

PrivateKey = struct (publicKey PublicKey, exponent Int, primeA Int, primeB Int) :

A private key.

EncryptOaep = struct (publicKey PublicKey, plaintext string, oaepLabel string) :

The data to pass to get ... from to get OAEP-encrypted text.

EncryptPkcs = struct (publicKey PublicKey, plaintext string) :

The data to pass to get ... from to get PKCS-encrypted text.

Commands

get(x ref) from (gk GenerateKey) :

Populates the reference variable with a private key.

get(x ref) from (e EncryptOaep) :

Gets the ciphertext from the plaintext using OAEP.

get(x ref) from (e EncryptPkcs) :

Gets the ciphertext from the plaintext using PKCS.

Functions

EncryptOaep(key PublicKey, plaintext string) :

Constructor for EncryptOaep defaulting to "" for the label.

decryptOaep(k PrivateKey, ciphertext string) -> string / error :

Decrypts an OAEP-encoded cyphertext into plaintext, with the OEAP label taken to be "".

decryptOaep(k PrivateKey, ciphertext string, oaepLabel string) -> string / error :

Decrypts an OAEP-encoded cyphertext into plaintext.

decryptPkcs(k PrivateKey, ciphertext string) -> string / error :

Decrypts a PKCS-encoded cyphertext into plaintext.

Notes

This page is automatically generated from the Pipefish standard library. Any edits made directly to this wiki page will be overwritten the next time the documentation is regenerated.

⚠️ **GitHub.com Fallback** ⚠️