Static
caseFinds the value in the given object for a case-insensitive key match.
The object to search for the key.
The key to search for in a case-insensitive manner.
The value corresponding to the key if found, otherwise null.
Static
caseSearches for a case-insensitive key in an array of objects and returns the corresponding value.
The array of objects to search through.
The key to search for in a case-insensitive manner.
The value corresponding to the key if found, otherwise null.
Static
caseSets a key-value pair in an object with case-insensitive key matching. If a key with the same name (case-insensitive) already exists, it updates the value.
The object to set the key-value pair in.
The key to set in the object (case-insensitive).
The value to set for the key.
The updated object with the key-value pair set.
Static
decryptPKCSDecrypts a hash using the provided private key using RSAES-PKCS1-V1_5 padding scheme.
The private key used for decryption.
The hash to be decrypted.
The decrypted hash.
Static
encryptPKCSEncrypts the given object using the provided public key using RSAES-PKCS1-V1_5 encryption scheme.
The public key used for encryption.
The object to be encrypted.
The encrypted object encoded in base64 format.
Static
isStatic
isChecks if the code is running in a Node.js environment.
true if running in Node.js, false otherwise
Static
isChecks if the input is a valid number.
The input to be checked for validity as a number.
Returns true if the input is a valid number, false otherwise.
Static
isCheck if a given value is a valid string.
The value to be checked.
Returns true if the value is a non-empty string and not an array, otherwise false.
Static
loadLoad a public key from a PEM formatted string using Forge library.
The public key in PEM format.
The public key object.
Static
openOpens an external page in a new tab/window.
The URL of the external page to open.
A flag indicating whether to append the protocol from the current page's URL.
None
Static
timestampReturns a timestamp after the specified number of hours from the current date and time.
The number of hours to add to the current date and time.
The timestamp after the specified number of hours.
Static
timestampCalculates the timestamp after adding a specified number of hours to a given date.
The number of hours to add to the date.
The initial date to start from.
The timestamp representing the date after adding the specified hours.
Utility class with static methods for common operations such as string and number validation, case-insensitive object manipulation, Node.js environment detection, timestamp calculations, encryption and decryption using PKCS standards, and opening external pages.