Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/mandarinets/security-core/utils/securityUtils.ts>SecurityUtils

Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Latest
class SecurityUtils
import { SecurityUtils } from "https://deno.land/x/mandarinets@v2.3.2/security-core/utils/securityUtils.ts";

Contains all the util methods used by the security core

Static Methods

compare(a:
| string
| number[]
| ArrayBuffer
| Uint8Array
, b:
| string
| number[]
| ArrayBuffer
| Uint8Array
): boolean

Compare two strings, Uint8Arrays, ArrayBuffers, or arrays of numbers in a way that avoids timing based attacks on the comparisons on the values.

The function will return true if the values match, or false, if they do not match.

compareArrayBuffer(a: ArrayBuffer, b: ArrayBuffer): boolean