Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Wildcard Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
PKCS #1 Source Code
 previous   up   next 

Function Summary
string
int2Octets (in bigInteger: number, in integer: length)
Convert a nonnegative bigInteger to an octet string of a specified length (I2OSP).
bigInteger
octets2int (in string: stri)
Convert an octet string to a nonnegative bigInteger (OS2IP).
string
emeOaepEncoding (in string: message, in string: label, in integer: modulusLen)
Encodes a string with the EME-OAEP encoding.
string
emeOaepDecoding (in string: encodedMessage, in string: label, in integer: modulusLen)
Decodes an EME-OAEP encoded string.
string
emePkcs1V15Encoding (in string: message, in integer: modulusLen)
Encodes a string with the EME-PKCS1-v1_5 encoding.
string
emePkcs1V15Decoding (in string: encodedMessage, in integer: modulusLen)
Decodes an EME-PKCS1-v1_5 encoded string.
bigInteger
rsaEncrypt (in rsaKey: encryptionKey, in bigInteger: message)
Encrypts a bigInteger with the RSAES encryption.
bigInteger
rsaDecrypt (in rsaKey: decryptionKey, in bigInteger: ciphertext)
Decrypts a bigInteger with the RSADP decryption.
string
rsaesOaepEncrypt (in rsaKey: encryptionKey, in string: message, in string: label)
Encrypts a string of bytes with the RSAES-OAEP encryption.
string
rsaesOaepDecrypt (in rsaKey: decryptionKey, in string: ciphertext, in string: label)
Decrypts a string of bytes with the RSAES-OAEP decryption.
string
rsaesPkcs1V15Encrypt (in rsaKey: encryptionKey, in string: message)
Encrypts a string of bytes with the RSAES-PKCS1-V1_5 encryption.
string
rsaesPkcs1V15Decrypt (in rsaKey: decryptionKey, in string: ciphertext)
Decrypts a string of bytes with the RSAES-PKCS1-V1_5 decryption.

Function Detail

int2Octets

const func string: int2Octets (in bigInteger: number, in integer: length)

Convert a nonnegative bigInteger to an octet string of a specified length (I2OSP).

Returns:
an octet string with the big-endian representation.
Raises:
RANGE_ERROR - when the result does not fit into length.

octets2int

const func bigInteger: octets2int (in string: stri)

Convert an octet string to a nonnegative bigInteger (OS2IP).

Returns:
a nonnegative bigInteger created from the big-endian bytes.
Raises:
RANGE_ERROR - When characters beyond '\255;' are present.

emeOaepEncoding

const func string: emeOaepEncoding (in string: message, in string: label, in integer: modulusLen)

Encodes a string with the EME-OAEP encoding.

Returns:
the EME-OAEP encoded string.

emeOaepDecoding

const func string: emeOaepDecoding (in string: encodedMessage, in string: label, in integer: modulusLen)

Decodes an EME-OAEP encoded string.

Returns:
the decoded string.
Raises:
RANGE_ERROR - when encodedMessage is not in the EME-OAEP format.

emePkcs1V15Encoding

const func string: emePkcs1V15Encoding (in string: message, in integer: modulusLen)

Encodes a string with the EME-PKCS1-v1_5 encoding.

Returns:
the EME-PKCS1-v1_5 encoded string.

emePkcs1V15Decoding

const func string: emePkcs1V15Decoding (in string: encodedMessage, in integer: modulusLen)

Decodes an EME-PKCS1-v1_5 encoded string.

Returns:
the decoded string.
Raises:
RANGE_ERROR - when encodedMessage is not in the EME-PKCS1-v1_5 format.

rsaEncrypt

const func bigInteger: rsaEncrypt (in rsaKey: encryptionKey, in bigInteger: message)

Encrypts a bigInteger with the RSAES encryption.

Returns:
the RSAES encrypted bigInteger.
Raises:
RANGE_ERROR - when message is too big for the RSAEP encryption.

rsaDecrypt

const func bigInteger: rsaDecrypt (in rsaKey: decryptionKey, in bigInteger: ciphertext)

Decrypts a bigInteger with the RSADP decryption.

Returns:
the RSADP decrypted bigInteger.
Raises:
RANGE_ERROR - when ciphertext is too big for the RSADP decryption.

rsaesOaepEncrypt

const func string: rsaesOaepEncrypt (in rsaKey: encryptionKey, in string: message, in string: label)

Encrypts a string of bytes with the RSAES-OAEP encryption.

Returns:
the RSAES-OAEP encrypted string of bytes.
Raises:
RANGE_ERROR - when the length of the message is too long to be encrypted.
RANGE_ERROR - When message contains characters beyond '\255;'.

rsaesOaepDecrypt

const func string: rsaesOaepDecrypt (in rsaKey: decryptionKey, in string: ciphertext, in string: label)

Decrypts a string of bytes with the RSAES-OAEP decryption.

Returns:
the RSAES-OAEP decrypted string of bytes.
Raises:
RANGE_ERROR - when the length of the ciphertext is too long to be decrypted.
RANGE_ERROR - When ciphertext contains characters beyond '\255;'.

rsaesPkcs1V15Encrypt

const func string: rsaesPkcs1V15Encrypt (in rsaKey: encryptionKey, in string: message)

Encrypts a string of bytes with the RSAES-PKCS1-V1_5 encryption.

Returns:
the RSAES-PKCS1-V1_5 encrypted string of bytes.
Raises:
RANGE_ERROR - when the length of the message is too long to be encrypted.
RANGE_ERROR - When message contains characters beyond '\255;'.

rsaesPkcs1V15Decrypt

const func string: rsaesPkcs1V15Decrypt (in rsaKey: decryptionKey, in string: ciphertext)

Decrypts a string of bytes with the RSAES-PKCS1-V1_5 decryption.

Returns:
the RSAES-PKCS1-V1_5 decrypted string of bytes.
Raises:
RANGE_ERROR - when the length of the ciphertext is too long to be decrypted.
RANGE_ERROR - When ciphertext contains characters beyond '\255;'.


 previous   up   next