hs.hash
Module
Module for hashing and encoding operations
Types
This module does not provide any types.
Properties
This module has no properties.
Methods
hs.hash.base64Encode
Encode a string to base64
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:20
Declaration
hs.hash.base64Encode(data) -> string
Parameters
-
datastringThe string to encode
Return Value
Base64 encoded string
hs.hash.base64Decode
Decode a base64 string
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:25
Declaration
hs.hash.base64Decode(data) -> string
Parameters
-
datastringThe base64 string to decode
Return Value
Decoded string, or nil if the input is invalid
hs.hash.md5
Generate MD5 hash of a string
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:31
Declaration
hs.hash.md5(data) -> string
Parameters
-
datastringThe string to hash
Return Value
Hexadecimal MD5 hash
hs.hash.sha1
Generate SHA1 hash of a string
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:36
Declaration
hs.hash.sha1(data) -> string
Parameters
-
datastringThe string to hash
Return Value
Hexadecimal SHA1 hash
hs.hash.sha256
Generate SHA256 hash of a string
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:41
Declaration
hs.hash.sha256(data) -> string
Parameters
-
datastringThe string to hash
Return Value
Hexadecimal SHA256 hash
hs.hash.sha512
Generate SHA512 hash of a string
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:46
Declaration
hs.hash.sha512(data) -> string
Parameters
-
datastringThe string to hash
Return Value
Hexadecimal SHA512 hash
hs.hash.hmacMD5
Generate HMAC-MD5 of a string with a key
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:54
Declaration
hs.hash.hmacMD5(key, data) -> string
Parameters
-
keystringThe secret key
-
datastringThe data to authenticate
Return Value
Hexadecimal HMAC-MD5
hs.hash.hmacSHA1
Generate HMAC-SHA1 of a string with a key
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:61
Declaration
hs.hash.hmacSHA1(key, data) -> string
Parameters
-
keystringThe secret key
-
datastringThe data to authenticate
Return Value
Hexadecimal HMAC-SHA1
hs.hash.hmacSHA256
Generate HMAC-SHA256 of a string with a key
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:68
Declaration
hs.hash.hmacSHA256(key, data) -> string
Parameters
-
keystringThe secret key
-
datastringThe data to authenticate
Return Value
Hexadecimal HMAC-SHA256
hs.hash.hmacSHA512
Generate HMAC-SHA512 of a string with a key
Hammerspoon 2/Modules/hs.hash/HSHashModule.swift:75
Declaration
hs.hash.hmacSHA512(key, data) -> string
Parameters
-
keystringThe secret key
-
datastringThe data to authenticate
Return Value
Hexadecimal HMAC-SHA512