bytevector=? - compare two bytevectors
(import (rnrs)) ;R6RS
(import (rnrs bytevectors)) ;R6RS
(bytevector=? bytevector1 bytevector2)
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.
Returns a single boolean object.
(bytevector=? #vu8(1 2 3) #vu8(1 2 3)) => #t
(bytevector=? #vu8(1 2 3) #vu8(0 1 2)) => #f
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.
This procedure is absent from R7RS. Use equal?(3scm) instead.
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.