W3cubDocs

/Crystal

class OpenSSL::SHA1

Overview

Binds the OpenSSL SHA1 hash functions.

Warning: SHA1 is no longer a cryptographically secure hash, and should not be used in security-related components, like password hashing. For passwords, see Crypto::Bcrypt::Password. For a generic cryptographic hash, use SHA-256 via OpenSSL::Digest.new("SHA256").

Defined in:

openssl/sha1.cr

Class Method Summary

Class Method Detail

def self.hash(data : Pointer(UInt8), bytesize : LibC::SizeT)Source

def self.hash(data : String)Source

© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/OpenSSL/SHA1.html