class

Beryl::Crypto::Compatibility::SecureHashAlgorithm1

Inherits Beryl::Crypto::V1::BlockHashFunction < Digest < Reference < Object

SHA-1 (FIPS 180-4 ยง6.1): a 160-bit digest.

WARNING: SHA-1 is broken for collision resistance. It is here only to read and speak formats that require it (WebSocket handshakes, UUID v5, PostgreSQL and MySQL authentication). Use Beryl::Crypto.digest for anything new.

Beryl::Crypto::Compatibility::SHA1.hexdigest("abc")
# => "a9993e364706816aba3e25717850c26c9cd0d89d"

Constants

BLOCK_SIZE = 64

The number of bytes the compression function consumes per step.

DIGEST_SIZE = 20

The number of bytes in the digest.

Instance methods

block_size

Returns the number of bytes the compression function consumes per step.

Source
digest_size

Returns the digest output size in bytes.

Source