Skip to content

ws1-framework/com.airwatch.crypto.openssl/OpenSSLCryptUtil

OpenSSLCryptUtil

open class OpenSSLCryptUtil : IOpenSSLCryptUtil

Utility class containing methods for a range of cryptographic task including generation of message digest, encryption/decryption, signature validation, etc.

API in this class uses equivalent API in OpenSSL library through JNI call.

Functions

Name Summary
checkX509CertificateVersion open fun checkX509CertificateVersion(certPath: String): Int
Checks the version attribute of an X.509 certificate.
generateRandomBytes open fun generateRandomBytes(size: Int, seed: Array<Byte>): Array<Byte>
Generates random bytes of the specified size using the provided seed.
getInstance open fun getInstance(): OpenSSLCryptUtil
Retrieves the singleton instance of OpenSSLCryptUtil.
sha256Hash open fun sha256Hash(toHash: Array<Byte>): Array<Byte>
Generates a SHA256 hash of the input byte array.
open fun sha256Hash(file: File): Array<Byte>
Generates a SHA256 hash of a file.
open fun sha256Hash(toHash: String): Array<Byte>
Generates a SHA256 hash of the input string.