HashData

internal data class HashData(val hashedUserId: UByteArray, val salt: UByteArray, val operationsLimit: ULong, val hashingMemoryLimit: Int)

Constructors

Link copied to clipboard
constructor(hashedUserId: UByteArray, salt: UByteArray, operationsLimit: ULong, hashingMemoryLimit: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val hashedUserId: UByteArray

The hashed ID of the user that originally created this backup. This hash is calculated using Argon2, with this salt, operationsLimit and hashingMemoryLimit. This array is HASHED_USER_ID_SIZE_IN_BYTES long.

Link copied to clipboard

Memory used by the hashing algorithm. See Libsodium's Documentation. This value has to be bigger than crypto_pwhash_MEMLIMIT_MIN.

Link copied to clipboard
val operationsLimit: ULong

Represents the maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. See Libsodium's Documentation.

Link copied to clipboard
val salt: UByteArray

The salt used in order to create the hashedUserId and used to derivate the encryption password to read/write the encrypted archive. This array is SALT_SIZE_IN_BYTES long.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int