Qore Programming Language Reference Manual  0.9.1
Cryptographic Stream Transformations

Variables

const Qore::CRYPTO_ALG_AES_128 = "aes128"
 Identifies the AES cryptographic algorithm in Galois Counter Mode (GCM) with a 128-bit (16 byte) key. More...
 
const Qore::CRYPTO_ALG_AES_192 = "aes192"
 Identifies the AES cryptographic algorithm in Galois Counter Mode (GCM) with a 192-bit (24 byte) key. More...
 
const Qore::CRYPTO_ALG_AES_256 = "aes256"
 Identifies the AES cryptographic algorithm in Galois Counter Mode (GCM) with a 256-bit (32 byte) key. More...
 
const Qore::CRYPTO_ALG_BLOWFISH = "blowfish"
 Identifies the blowfish cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_BLOWFISH_CFB = "blowfish-cfb"
 Identifies the blowfish cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_BLOWFISH_OFB = "blowfish-ofb"
 Identifies the blowfish cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_CAST5 = "cast5"
 Identifies the CAST5 cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_CAST5_CFB = "cast5-cfb"
 Identifies the CAST5 cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_CAST5_OFB = "cast5-ofb"
 Identifies the CAST5 cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_DES = "des"
 Identifies the DES cryptographic algorithm in Cipher Block Chaining (CBC) mode with a 64-bit (8 byte) key. More...
 
const Qore::CRYPTO_ALG_DESX = "desx"
 Identifies RSA's DESX cryptographic algorithm in Cipher Block Chaining (CBC) mode with a 192-bit (24 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_CFB = "des-cfb"
 Identifies the DES cryptographic algorithm in Cipher Feedback (CFB) mode with a 64-bit (8 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_EDE = "desede"
 Identifies the two-key triple DES algorithm in Cipher Block Chaining (CBC) mode with a 128-bit (16 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_EDE3 = "desede3"
 Identifies the three-key triple DES algorithm in Cipher Block Chaining (CBC) mode with a 192-bit (24 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_EDE3_CFB = "desede3-cfb"
 Identifies the three-key triple DES algorithm in Cipher Feedback (CFB) mode with a 192-bit (24 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_EDE3_OFB = "desede3-ofb"
 Identifies the three-key triple DES algorithm in Output Feedback (OFB) mode with a 192-bit (24 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_EDE_CFB = "desede-cfb"
 Identifies the two-key triple DES algorithm in Cipher Feedback (CFB) mode with a 128-bit (16 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_EDE_OFB = "desede-ofb"
 Identifies the two-key triple DES algorithm in Output Feedback (OFB) mode with a 128-bit (16 byte) key. More...
 
const Qore::CRYPTO_ALG_DES_OFB = "des-ofb"
 Identifies the DES cryptographic algorithm in Output Feedback (OFB) mode with a 64-bit (8 byte) key. More...
 
const Qore::CRYPTO_ALG_RC2 = "rc2"
 Identifies RSA's RC2(tm) cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_RC2_CFB = "rc2-cfb"
 Identifies RSA's RC2(tm) cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_RC2_OFB = "rc2-ofb"
 Identifies RSA's RC2(tm) cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_RC4 = "rc4"
 Identifies the Alleged RC4 cryptographic algorithm, which should be compatible with RSA's RC4(TM) algorithm in Cipher Block Chaining (CBC) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_RC5 = "rc5"
 Identifies the RC5 cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_RC5_CFB = "rc5-cfb"
 Identifies the RC5 cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key. More...
 
const Qore::CRYPTO_ALG_RC5_OFB = "rc5-ofb"
 Identifies the RC5 cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key. More...
 

Detailed Description

The following Transform constants can be used with TransformInputStream and TransformOutputStream to transform stream data

Example:
Qore::FileOutputStream of("my-file.txt");
Qore::TransformOutputStream ts(of, get_decryptor(Qore::CRYPTO_ALG_BLOWFISH));

These constants are useful in the following functions:

See also
Compression Stream Transformations
Since
Qore 0.8.13

Variable Documentation

◆ CRYPTO_ALG_AES_128

const Qore::CRYPTO_ALG_AES_128 = "aes128"

Identifies the AES cryptographic algorithm in Galois Counter Mode (GCM) with a 128-bit (16 byte) key.

The initialization vector is recommended to be 12 bytes in this case

Note
  • This algorithm supports returning a Message Authentication Code (MAC) when encrypting and requires a MAC for decryption, therefore at least one byte of the MAC should be retrieved when encoding as well
  • The size of the calculated tag for the MAC is 16 bytes; shorter sizes can also be used
  • This algorithm also supports Additional Authenticated Data (AAD) for encryption and decryption

◆ CRYPTO_ALG_AES_192

const Qore::CRYPTO_ALG_AES_192 = "aes192"

Identifies the AES cryptographic algorithm in Galois Counter Mode (GCM) with a 192-bit (24 byte) key.

The initialization vector is recommended to be 12 bytes in this case.

Note
  • This algorithm supports returning a Message Authentication Code (MAC) when encrypting and requires a MAC for decryption, therefore at least one byte of the MAC should be retrieved when encoding as well
  • The size of the calculated tag for the MAC is 16 bytes; shorter sizes can also be used
  • This algorithm also supports Additional Authenticated Data (AAD) for encryption and decryption

◆ CRYPTO_ALG_AES_256

const Qore::CRYPTO_ALG_AES_256 = "aes256"

Identifies the AES cryptographic algorithm in Galois Counter Mode (GCM) with a 256-bit (32 byte) key.

The initialization vector is recommended to be 12 bytes in this case

Note
  • This algorithm supports returning a Message Authentication Code (MAC) when encrypting and requires a MAC for decryption, therefore at least one byte of the MAC should be retrieved when encoding as well
  • The size of the calculated tag for the MAC is 16 bytes; shorter sizes can also be used
  • This algorithm also supports Additional Authenticated Data for encryption and decryption

◆ CRYPTO_ALG_BLOWFISH

const Qore::CRYPTO_ALG_BLOWFISH = "blowfish"

Identifies the blowfish cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key.

This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_BLOWFISH_CFB

const Qore::CRYPTO_ALG_BLOWFISH_CFB = "blowfish-cfb"

Identifies the blowfish cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key.

This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_BLOWFISH_OFB

const Qore::CRYPTO_ALG_BLOWFISH_OFB = "blowfish-ofb"

Identifies the blowfish cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key.

This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_CAST5

const Qore::CRYPTO_ALG_CAST5 = "cast5"

Identifies the CAST5 cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key.

Note
This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_CAST5_CFB

const Qore::CRYPTO_ALG_CAST5_CFB = "cast5-cfb"

Identifies the CAST5 cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key.

Note
This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_CAST5_OFB

const Qore::CRYPTO_ALG_CAST5_OFB = "cast5-ofb"

Identifies the CAST5 cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key.

Note
This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_DES

const Qore::CRYPTO_ALG_DES = "des"

Identifies the DES cryptographic algorithm in Cipher Block Chaining (CBC) mode with a 64-bit (8 byte) key.

Note
  • This algorithm requires an 8-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_CFB

const Qore::CRYPTO_ALG_DES_CFB = "des-cfb"

Identifies the DES cryptographic algorithm in Cipher Feedback (CFB) mode with a 64-bit (8 byte) key.

Note
  • This algorithm requires an 8-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_EDE

const Qore::CRYPTO_ALG_DES_EDE = "desede"

Identifies the two-key triple DES algorithm in Cipher Block Chaining (CBC) mode with a 128-bit (16 byte) key.

Note
  • This algorithm requires a 16-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_EDE3

const Qore::CRYPTO_ALG_DES_EDE3 = "desede3"

Identifies the three-key triple DES algorithm in Cipher Block Chaining (CBC) mode with a 192-bit (24 byte) key.

Note
  • This algorithm requires a 24-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_EDE3_CFB

const Qore::CRYPTO_ALG_DES_EDE3_CFB = "desede3-cfb"

Identifies the three-key triple DES algorithm in Cipher Feedback (CFB) mode with a 192-bit (24 byte) key.

Note
  • This algorithm requires a 24-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_EDE3_OFB

const Qore::CRYPTO_ALG_DES_EDE3_OFB = "desede3-ofb"

Identifies the three-key triple DES algorithm in Output Feedback (OFB) mode with a 192-bit (24 byte) key.

Note
  • This algorithm requires a 24-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_EDE_CFB

const Qore::CRYPTO_ALG_DES_EDE_CFB = "desede-cfb"

Identifies the two-key triple DES algorithm in Cipher Feedback (CFB) mode with a 128-bit (16 byte) key.

Note
  • This algorithm requires a 16-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_EDE_OFB

const Qore::CRYPTO_ALG_DES_EDE_OFB = "desede-ofb"

Identifies the two-key triple DES algorithm in Output Feedback (OFB) mode with a 128-bit (16 byte) key.

Note
  • This algorithm requires a 16-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DES_OFB

const Qore::CRYPTO_ALG_DES_OFB = "des-ofb"

Identifies the DES cryptographic algorithm in Output Feedback (OFB) mode with a 64-bit (8 byte) key.

Note
  • This algorithm requires an 8-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_DESX

const Qore::CRYPTO_ALG_DESX = "desx"

Identifies RSA's DESX cryptographic algorithm in Cipher Block Chaining (CBC) mode with a 192-bit (24 byte) key.

Note
  • This algorithm requires a 24-byte key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD)
  • Keys longer than the required length will be used up to the required byte length; additional bytes are ignored

◆ CRYPTO_ALG_RC2

const Qore::CRYPTO_ALG_RC2 = "rc2"

Identifies RSA's RC2(tm) cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key.

Note
this algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_RC2_CFB

const Qore::CRYPTO_ALG_RC2_CFB = "rc2-cfb"

Identifies RSA's RC2(tm) cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key.

Note
this algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_RC2_OFB

const Qore::CRYPTO_ALG_RC2_OFB = "rc2-ofb"

Identifies RSA's RC2(tm) cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key.

Note
this algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_RC4

const Qore::CRYPTO_ALG_RC4 = "rc4"

Identifies the Alleged RC4 cryptographic algorithm, which should be compatible with RSA's RC4(TM) algorithm in Cipher Block Chaining (CBC) mode with a variable-length key.

Note
  • This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).
  • This algorithm does not support (ignores) initialization vectors

◆ CRYPTO_ALG_RC5

const Qore::CRYPTO_ALG_RC5 = "rc5"

Identifies the RC5 cryptographic algorithm in Cipher Block Chaining (CBC) mode with a variable-length key.

Platform Availability:
Qore::Option::HAVE_RC5

Use of this cipher is only possible if the constant listed above is True

Note
This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_RC5_CFB

const Qore::CRYPTO_ALG_RC5_CFB = "rc5-cfb"

Identifies the RC5 cryptographic algorithm in Cipher Feedback (CFB) mode with a variable-length key.

Platform Availability:
Qore::Option::HAVE_RC5

Use of this cipher is only possible if the constant listed above is True

Note
This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).

◆ CRYPTO_ALG_RC5_OFB

const Qore::CRYPTO_ALG_RC5_OFB = "rc5-ofb"

Identifies the RC5 cryptographic algorithm in Output Feedback (OFB) mode with a variable-length key.

Platform Availability:
Qore::Option::HAVE_RC5

Use of this cipher is only possible if the constant listed above is True

Note
This algorithm supports a variable-length key and does not support a Message Authentication Code (MAC) or Additional Authenticated Data (AAD).