| bytevector=?(3scm) | Scheme Programmer's Manual | bytevector=?(3scm) |
NAME
bytevector=? - compare two bytevectors
LIBRARY
(import (rnrs)) ;R6RS (import (rnrs bytevectors)) ;R6RS
SYNOPSIS
(bytevector=? bytevector1 bytevector2)
DESCRIPTION
Returns #t if bytevector1 and bytevector2 are equal. They are equal if they have the same length and equal bytes at all valid indices. It returns #f otherwise.
RETURN VALUES
Returns a single boolean object.
EXAMPLES
(bytevector=? #vu8(1 2 3) #vu8(1 2 3)) => #t (bytevector=? #vu8(1 2 3) #vu8(0 1 2)) => #f
APPLICATION USAGE
Programs that work with sensitive data such as passwords and message digests must never use this procedure with attacker-controlled data. It may leak information through the time it takes to execute, leading to the movie trope where a password is cracked one letter at a time.
COMPATIBILITY
This procedure is absent from R7RS. Use equal?(3scm) instead.
ERRORS
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
- The wrong number of arguments was passed or an argument was outside its domain.
SEE ALSO
equal?(3scm)
STANDARDS
R6RS
AUTHORS
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.
| 2021-02-28 |