Machina Client SDK Version 2.1.2
Ionic Security Machina Client SDK for Python users
|
Functions | |
def | sha256 (inbytes) |
Generate a SHA256 hash code. More... | |
def | hmac_sha256 (inbytes, keybytes) |
Generate a HMAC_SHA256 hash code. More... | |
def | sha512 (inbytes) |
Generate a SHA512 hash code. More... | |
def | hmac_sha512 (inbytes, keybytes) |
Generate a HMAC_SHA512 hash code. More... | |
def | pbkdf2 (inbytes, saltbytes, iterations, hashlen) |
Performs the PBKDF2 key derivation algorithm on provided input bytes and optional salt. More... | |
def | initialize () |
Initialize the crypto library. More... | |
def | shutdown () |
Shutdown the crypto library. More... | |
def | setCryptoSharedLibraryFipsMode (isFips) |
Sets whether on the Windows, Mac, or Linux platform, ISCRYPTO will load a FIPS approved crypto module or not. More... | |
def | setCryptoSharedLibraryCustomDirectory (sharedDirectory) |
Allows the user to set a custom folder for Ionic to check for the Crypto module. More... | |
def | setCryptoSharedLibraryCustomPath (sharedLibPath) |
Allows the user to use a custom crypto module. More... | |
def | getCryptoSharedLibraryLoadedFilename () |
Gets the full path filename of the crypto module loaded or an empty string otherwise. More... | |
Various cryptographics functions.
def ionicsdk.cryptoutil.getCryptoSharedLibraryLoadedFilename | ( | ) |
Gets the full path filename of the crypto module loaded or an empty string otherwise.
Allows the user to check if the crypto module has loaded and if it is the correct module.
def ionicsdk.cryptoutil.hmac_sha256 | ( | inbytes, | |
keybytes | |||
) |
Generate a HMAC_SHA256 hash code.
inbytes | (bytes): The data to hash |
keybytes | (bytes): The key bytes |
def ionicsdk.cryptoutil.hmac_sha512 | ( | inbytes, | |
keybytes | |||
) |
Generate a HMAC_SHA512 hash code.
inbytes | (bytes): The data to hash |
keybytes | (bytes): The key bytes |
def ionicsdk.cryptoutil.initialize | ( | ) |
Initialize the crypto library.
This function must be called before any function from any part of the cryptography library may be called. Applications typically call this function during startup before doing any work.
NOTE: crypto functions will call this function as needed, so the only reason the user might want to call it themselves is to check for a bad result or to force the crypto module to load at a convenient earlier time.
This function may be called redundantly, and when called this way, it throws the exception from the initial call, if any error occurred at that time.
def ionicsdk.cryptoutil.pbkdf2 | ( | inbytes, | |
saltbytes, | |||
iterations, | |||
hashlen | |||
) |
Performs the PBKDF2 key derivation algorithm on provided input bytes and optional salt.
inbytes | (bytes): The data to hash |
saltbytes | (bytes): The salt bytes |
iterations | (int): The number of iterations (must be greater than zero) |
hashlen | (int): The length of the desired output hash length, which must be greater than zero. The computed hash will be this length. |
def ionicsdk.cryptoutil.setCryptoSharedLibraryCustomDirectory | ( | sharedDirectory | ) |
Allows the user to set a custom folder for Ionic to check for the Crypto module.
As an example, the SDK, by default, checks for the crypto module in the same directory as the currently running executable. However, an installation may place these in a central location.
[in] | sharedDirectory | (unicode) directory to find the crypto module. |
def ionicsdk.cryptoutil.setCryptoSharedLibraryCustomPath | ( | sharedLibPath | ) |
Allows the user to use a custom crypto module.
The module must contain specific Ionic API. This overrides any other settings regarding which crypto module to load.
[in] | sharedLibPath | (unicode) full path name of a custom crypto shared library. |
def ionicsdk.cryptoutil.setCryptoSharedLibraryFipsMode | ( | isFips | ) |
Sets whether on the Windows, Mac, or Linux platform, ISCRYPTO will load a FIPS approved crypto module or not.
The FIPS approved module will be older code, in general, and on Linux, may block waiting for entropy.
[in] | isFips | (bool) true for FIPS module, false for the alternate |
def ionicsdk.cryptoutil.sha256 | ( | inbytes | ) |
Generate a SHA256 hash code.
inbytes | (bytes): The data to hash |
def ionicsdk.cryptoutil.sha512 | ( | inbytes | ) |
Generate a SHA512 hash code.
inbytes | (bytes): The data to hash |
def ionicsdk.cryptoutil.shutdown | ( | ) |
Shutdown the crypto library.
This function should be called before the application terminates or when the crypto library is no longer needed. This gives the crypto library a chance to release any resources that were allocated by initialization or during operation. This function calls the crypto module shutdown internally and then unloads the crypto module.
A user might use this to unload a crypto module in preparation for loading some other alternate module. Users should do this with great care as any memory allocated by the old module will have undefined behavior with the new module - for example, an RSA key generated or loaded using the crypto API. This data will likely contain entirely different formats internally.
You acknowledge your access, review and use of the documentation on this page is subject to the Ionic Security Inc. Documentation Use Rights.
© 2016-2021 Ionic Security Inc. All rights reserved. -
Generated on Wed Jul 21 2021 16:23:36 for Machina Client SDK Version 2.1.2 by
1.8.18