OpenAPI 1.0

com.aquafold.openapi.crypto
Interface AQCrypto


public interface AQCrypto

This interface provides access to cryptographic functions. An object implementing this interface is available in aquascripts via aqua.crypto alias.


Method Summary
 String computeHashMD2(Object input)
          Generates an MD2 hash for the specified object.
 String computeHashMD5(Object input)
          Generates a MD5 hash for the specified object.
 String computeHashSHA1(Object input)
          Generates a SHA1 hash for the specified object.
 String computeHashSHA256(Object input)
          Generates a SHA-256 hash for the specified object.
 String computeHashSHA384(Object input)
          Generates a SHA-384 hash for the specified object.
 String computeHashSHA512(Object input)
          Generates a SHA-512 hash for the specified object.
 void decryptZipAES(String sourceZipFile, String destinationFolder, Object password)
          Decrypts a zip file with the AES-256 cipher using the supplied password.
 void encryptZipAES(String sourceZipFile, String destinationZipFile, Object password)
          Encrypts a zip file with the AES-256 cipher using the supplied password.
 AQOpaqueObject getSecureField(String name)
          Retrieves an opaque value from a secure storage.
 boolean verifyHashMD2(Object input, String hash)
          Verify the hash value of the specified object using MD2.
 boolean verifyHashMD5(Object input, String hash)
          Verify the hash value of the specified object using MD5.
 boolean verifyHashSHA1(Object input, String hash)
          Verify the hash value of the specified object using SHA.
 boolean verifyHashSHA256(Object input, String hash)
          Verify the hash value of the specified object using SHA-256.
 boolean verifyHashSHA384(Object input, String hash)
          Verify the hash value of the specified object using SHA-384.
 boolean verifyHashSHA512(Object input, String hash)
          Verify the hash value of the specified object using SHA-512.
 

Method Detail

computeHashMD2

String computeHashMD2(Object input)
                      throws Exception
Generates an MD2 hash for the specified object.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input object.
Throws:
Exception

computeHashMD5

String computeHashMD5(Object input)
                      throws Exception
Generates a MD5 hash for the specified object.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input object.
Throws:
Exception

computeHashSHA1

String computeHashSHA1(Object input)
                       throws Exception
Generates a SHA1 hash for the specified object.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input object.
Throws:
Exception

computeHashSHA256

String computeHashSHA256(Object input)
                         throws Exception
Generates a SHA-256 hash for the specified object.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input object.
Throws:
Exception

computeHashSHA384

String computeHashSHA384(Object input)
                         throws Exception
Generates a SHA-384 hash for the specified object.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input object.
Throws:
Exception

computeHashSHA512

String computeHashSHA512(Object input)
                         throws Exception
Generates a SHA-512 hash for the specified object.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input object.
Throws:
Exception

verifyHashMD2

boolean verifyHashMD2(Object input,
                      String hash)
Verify the hash value of the specified object using MD2.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input Object
hash - Hash value

verifyHashMD5

boolean verifyHashMD5(Object input,
                      String hash)
Verify the hash value of the specified object using MD5.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input Object
hash - Hash value

verifyHashSHA1

boolean verifyHashSHA1(Object input,
                       String hash)
Verify the hash value of the specified object using SHA.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input Object
hash - Hash value

verifyHashSHA256

boolean verifyHashSHA256(Object input,
                         String hash)
Verify the hash value of the specified object using SHA-256.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input Object
hash - Hash value

verifyHashSHA384

boolean verifyHashSHA384(Object input,
                         String hash)
Verify the hash value of the specified object using SHA-384.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input Object
hash - Hash value

verifyHashSHA512

boolean verifyHashSHA512(Object input,
                         String hash)
Verify the hash value of the specified object using SHA-512.

Acceptable object types are:

The hash value of String and Object types is computed for the byte array obtained by converting the input object to UTF-8 string.

Parameters:
input - Input Object
hash - Hash value

encryptZipAES

void encryptZipAES(String sourceZipFile,
                   String destinationZipFile,
                   Object password)
                   throws Exception
Encrypts a zip file with the AES-256 cipher using the supplied password.

Parameters:
sourceZipFile - File name of the source zip file in the local file system.
destinationZipFile - File name of the destination zip file.
password - A string or AQOpaqueObject password.
Throws:
Exception

decryptZipAES

void decryptZipAES(String sourceZipFile,
                   String destinationFolder,
                   Object password)
                   throws Exception
Decrypts a zip file with the AES-256 cipher using the supplied password.

Parameters:
sourceZipFile - File name of the source zip file in the local file system.
destinationFolder - Name of the destination folder
password - A string or AQOpaqueObject password.
Throws:
Exception

getSecureField

AQOpaqueObject getSecureField(String name)
Retrieves an opaque value from a secure storage. This method allows user-specific values such as passwords, names, credentials and the like to be accessed by a script without revealing the actual value.

Aqua Data Studio: User specific values are determined by the Options->Secure Storage.
Aqua Data Server: User specific values are determined by the user executing the script.

When script is running in:

  1. Dashboard: it uses the values from currently logged in user's Secure Storage.
  2. View/Edit AquaScript: it uses the values from current logged in user's Secure Storage.
  3. Scheduled Job: Started manually or by schedule it will use the values from the Secure Storage of the owner of the job.

Parameters:
name - Field name.

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.