Encrypt password with security command I want to deploy smb password with ARD, or create a small script.

With the command security I have the possibility to add a password in keychain without share the password.

security add-internet-password -a "user" -s "192.168.1.104" -w "password" -l "192.168.1.103" -D "network password" -r "smb " -T /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthSysAgent

But I like to encrypt the password as does if sharing wifi password (https://www.idownloadblog.com/2018/01/11/ios-11-how-to-share-wi-fi-passwords) and the user doesn't see it.

But in the man I don't see how to do it!
The “encryption” used for WiFi passwords is really just a part of the WiFi security protocol. I.e. it is a kind of precalculation of what would otherwise happen when you attach to a WiFi network. This is very specific to WiFi.

If you did the same “precalculation” for a SMB password, it wouldn’t work anymore and it can’t be used for logging on to SMB shares.