Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions SecureMemory.constantTimeCompare

1
2
3
4
5
module juptune.crypto.memory;

bool constantTimeCompare(
    const const void[] other
);

Documentation

Compares this memory to another memory in constant time for the given length of this memory.

Assertions

othermust have the same length as this memory. There is no valid usecase for comparing secure memory of different lengths.

Notes

You should always use this function if othercontains sensitive data. Failure to do so opens you up to timing attacks.

Params

Returns

true if the memory is equal, false otherwise.

Override Functions SecureMemory.constantTimeCompare

1
2
3
4
5

Documentation

ditto.