Client SDK Version 2.0.0
Ionic Security client SDK for Python users
Functions
ionicsdk.cryptoutil Namespace Reference

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...
 

Detailed Description

Various cryptographics functions.

Function Documentation

◆ hmac_sha256()

def ionicsdk.cryptoutil.hmac_sha256 (   inbytes,
  keybytes 
)

Generate a HMAC_SHA256 hash code.

Parameters
inbytes(bytes): The data to hash
keybytes(bytes): The key bytes
Returns
(bytes) The 256 bit hash as a byte array

◆ hmac_sha512()

def ionicsdk.cryptoutil.hmac_sha512 (   inbytes,
  keybytes 
)

Generate a HMAC_SHA512 hash code.

Parameters
inbytes(bytes): The data to hash
keybytes(bytes): The key bytes
Returns
(bytes) The 256 bit hash as a byte array

◆ pbkdf2()

def ionicsdk.cryptoutil.pbkdf2 (   inbytes,
  saltbytes,
  iterations,
  hashlen 
)

Performs the PBKDF2 key derivation algorithm on provided input bytes and optional salt.

Parameters
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.
Returns
(bytes) The output bytes

◆ sha256()

def ionicsdk.cryptoutil.sha256 (   inbytes)

Generate a SHA256 hash code.

Parameters
inbytes(bytes): The data to hash
Returns
(bytes) The 256 bit hash as a byte array

◆ sha512()

def ionicsdk.cryptoutil.sha512 (   inbytes)

Generate a SHA512 hash code.

Parameters
inbytes(bytes): The data to hash
Returns
(bytes) The 256 bit hash as a byte array