safe

package
v0.0.0-...-5a03b40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package safe implements secure functionality.

Index

Constants

View Source
const MaxCompareLen = 1 << 10

MaxCompareLen denotes the maximum size, in bytes, for strings that the Compare function supports.

Variables

This section is empty.

Functions

func Compare

func Compare(expected, actual string) bool

Compare tries to compares the given strings in constant time.

Compare always returns false in case any of the given strings is longer than MaxCompareLen bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL