Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Encryption Functions

MD5(String s)

Calculates an MD5 checksum for the string.

SHA1(String s)

Calculates an SHA-1 checksum for the string.

SHA256(String s)

Calculates an SHA-265 checksum for the string.

SHA384(String s)

Calculates an SHA-384 checksum for the string.

SHA512(String s)

Calculates an SHA-512 checksum for the string.

DSA(Number size)

Generates a DSA key pair of the given size.

RSA(Number size)

Generates a RSA key pair of the given size.

RSASign

EC(Number size)

Generates a Elliptic Curve key pair of the given size.

<Digest>with<Encryption>Sign(Object o,String  key)


Computes a signature for the given object with the given private key using the given message digest with the given signature algorithm.

The following combinations are supported:

  • NONEwithRSA
  • MD2withRSA
  • MD5withRSA
  • SHA1withRSA
  • SHA256withRSA
  • SHA384withRSA
  • SHA512withRSA
  • NONEwithDSA
  • SHA1withDSA
  • NONEwithECDSA
  • SHA1withECDSA

  • SHA256withECDSA

  • SHA384withECDSA

  • SHA512withECDSA

Code Block
languagesql
titleExample
SELECT rsaSignSHA256withRSASign("Hello World", "30820154020100300D...) FROM Stream
=> 51DC22BAFD51B112C72...
RSAVerify

<Digest>with<Encryption>Verify(Object o, String signature, String key)

Verifies the signature for the given object with the given public key using the given message digest with the given signature algorithm.

The following combinations are supported:

  • NONEwithRSA
  • MD2withRSA
  • MD5withRSA
  • SHA1withRSA
  • SHA256withRSA
  • SHA384withRSA
  • SHA512withRSA
  • NONEwithDSA
  • SHA1withDSA
  • NONEwithECDSA
  • SHA1withECDSA

  • SHA256withECDSA

  • SHA384withECDSA

  • SHA512withECDSA

Code Block
languagesql
titleExample
SELECT rsaVerifySHA256withRSAVerify("Hello World", "51DC22BAFD51B112C72...", "305C300D06092A8648...) FROM Stream
=> true

Table of Contents