Import std.crypto.hashes
std.crypto.hashes
Md5, Sha1, Sha256, and Sha512, over mbedTLS: each one's Hash gives the hash of bytes, or of a String's bytes, at once, and an object of it adds them in turn. MD5 and SHA-1 are broken, since two inputs with one hash can be made, so they're only for checksums and the formats that ask for them; Sha256 and Sha512 are for the rest.
std/crypto/hashes.fb
Types
Hasher
interface
Public Interface Hasher
What hashes bytes added to it in turn. Finish gives the hash of what was added, and starts again, empty.
-
Adds
datato what it hashes. -
Adds
text's UTF-8 bytes to what it hashes. -
The hash of what was added, which starts it again, empty.
Md5
class
Public Class Md5 Implements Hasher
MD5's 16 bytes, only for checksums.
-
A new Md5, of nothing yet.
-
The MD5 of
data. -
The MD5 of
text's UTF-8 bytes. -
Adds
datato what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
Adds
text's UTF-8 bytes to what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
The hash of what was added, which starts it again, empty.
Doc from
std.crypto.hashes.Hasher.Finish.
Sha1
class
Public Class Sha1 Implements Hasher
SHA-1's 20 bytes, only for checksums and the formats that ask for it, like Git's.
-
A new Sha1, of nothing yet.
-
The SHA-1 of
data. -
The SHA-1 of
text's UTF-8 bytes. -
Adds
datato what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
Adds
text's UTF-8 bytes to what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
The hash of what was added, which starts it again, empty.
Doc from
std.crypto.hashes.Hasher.Finish.
Sha256
class
Public Class Sha256 Implements Hasher
SHA-256's 32 bytes.
-
A new Sha256, of nothing yet.
-
The SHA-256 of
data. -
The SHA-256 of
text's UTF-8 bytes. -
Adds
datato what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
Adds
text's UTF-8 bytes to what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
The hash of what was added, which starts it again, empty.
Doc from
std.crypto.hashes.Hasher.Finish.
Sha512
class
Public Class Sha512 Implements Hasher
SHA-512's 64 bytes.
std/crypto/hashes.fb, line 123
-
A new Sha512, of nothing yet.
-
The SHA-512 of
data. -
The SHA-512 of
text's UTF-8 bytes. -
Adds
datato what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
Adds
text's UTF-8 bytes to what it hashes.Doc from
std.crypto.hashes.Hasher.Add. -
The hash of what was added, which starts it again, empty.
Doc from
std.crypto.hashes.Hasher.Finish.
Report an issue with this page or with FutureBlitz on GitHub.