Hash utility to hash a string OpenWRT

I am looking for a package which will provide a utility to perform a hash ( SHA256 & SHA512) of string before writing into a file.

I have tried to to use the inbuilt utilities which are expecting the files as an input. As a next step, I have tried to install the kmod-crypto-hash , but failed due to kernel dependencies.

Downloading http://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-crypto-hash_4.19.81-1_x86_64.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-crypto-hash:
 *      kernel (= 4.19.81-1-ff27189b77ae17b648a8e4b313fc1e3d)
 * opkg_install_cmd: Cannot install package kmod-crypto-hash.

Any other packages that can serve the purpose of hashing a string ?

Have you tried to pipe your string to the command line tools sha256sum and sha512sum?
For example: echo "your string" | sha256sum