module Crypto::Subtle

Defined in:


Class Method Summary

Class Method Detail

def self.constant_time_byte_eq(x, y) #

[View source]
def self.constant_time_compare(x, y) : Bool #

Compares x and y in constant time and returns true if they are the same, and false if they are not. Note: x and y must be able to respond to to_slice.

Crypto::Suble.constant_time_compare("foo","bar") => false
Crypto::Suble.constant_time_compare("foo","foo") => true

[View source]