Skip to content

Commit

Permalink
Renamed parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Sep 21, 2024
1 parent 359628c commit 07ed567
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/dm_crypto.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module dm_crypto

integer, parameter :: c_unsigned_char = c_signed_char

character(len=*), parameter :: HASH_FMT = '(*(z2.2))'
character(len=*), parameter :: FMT_HASH = '(*(z2.2))'

! Digest array sizes.
integer, parameter, public :: CRYPTO_MD4_DIGEST_LEN = 16
Expand Down Expand Up @@ -146,7 +146,7 @@ function dm_crypto_md4(str) result(hash)
hash = ' '
ptr = c_md4(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_md4

Expand All @@ -162,7 +162,7 @@ function dm_crypto_md5(str) result(hash)
hash = ' '
ptr = c_md5(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_md5

Expand All @@ -178,7 +178,7 @@ function dm_crypto_ripemd160(str) result(hash)
hash = ' '
ptr = c_ripemd160(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_ripemd160

Expand All @@ -194,7 +194,7 @@ function dm_crypto_sha1(str) result(hash)
hash = ' '
ptr = c_sha1(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_sha1

Expand All @@ -210,7 +210,7 @@ function dm_crypto_sha224(str) result(hash)
hash = ' '
ptr = c_sha224(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_sha224

Expand All @@ -226,7 +226,7 @@ function dm_crypto_sha256(str) result(hash)
hash = ' '
ptr = c_sha256(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_sha256

Expand All @@ -242,7 +242,7 @@ function dm_crypto_sha384(str) result(hash)
hash = ' '
ptr = c_sha384(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_sha384

Expand All @@ -258,7 +258,7 @@ function dm_crypto_sha512(str) result(hash)
hash = ' '
ptr = c_sha512(str, len(str, kind=c_size_t), raw)
if (.not. c_associated(ptr)) return
write (hash, HASH_FMT) (raw(i), i = 1, size(raw))
write (hash, FMT_HASH) (raw(i), i = 1, size(raw))
call dm_to_lower(hash)
end function dm_crypto_sha512
end module dm_crypto

0 comments on commit 07ed567

Please sign in to comment.