class MbedTLS::Digest::MD2
- MbedTLS::Digest::MD2
- MbedTLS::Digest
- Reference
- Object
Overview
A binding to the mbed TLS implementation of the MD2 digest algorithm.
NOTE The MD2 digest algorithm is old and most vendors do not build mbed TLS with support for it.
DEPRECATED The MD2 digest algorithm is no longer considered cryptographically secure. Restrict its use to backwards compatibile applications, and plan to halt its use entirely in the future.
Defined in:
Constructors
-
.new
Creates a new instance for hashing data with MD2.
Class Method Summary
-
.is_supported?
Whether the linked libmbedcrypto supports the MD2 digest.
Instance Method Summary
-
#clone : MD2
Creates a new
MD2
instance with the same internal state. -
#digest_size : UInt8
The size of the digest's output, in bytes.
-
#md_type_of : Type
The
Type
enum of this Digest algorithm.
Instance methods inherited from class MbedTLS::Digest
base64digest!
base64digest!,
clone : Digest
clone,
digest!
digest!,
digest_size : UInt8
digest_size,
finalize
finalize,
hexdigest!
hexdigest!,
md_type_of : Type
md_type_of,
name : String
name,
reset
reset,
to_unsafe : Pointer(LibMbedCrypto::MDContext)
to_unsafe,
update(data : String | Slice)
update
Class methods inherited from class MbedTLS::Digest
supported_types
supported_types
Instance methods inherited from module MbedTLS::DigestBase
<<(data)
<<,
base64digest
base64digest,
digest
digest,
file(file_name)
file,
hexdigest
hexdigest,
to_s(io)
to_s,
update(io : IO)
update
Class methods inherited from module MbedTLS::DigestBase
hexdump(digest)
hexdump
Constructor Detail
Creates a new instance for hashing data with MD2.
Raises a DigestError
if the linked copy of libmbedcrypto was not
compiled with support for the MD2 digest algorithm.
Class Method Detail
Instance Method Detail
Creates a new MD2
instance with the same internal state.
Raises a DigestError
if a library issue happens during the clone operation.
The size of the digest's output, in bytes. This is the size of the raw digest, not it's hex representation.