If you have a password storage unit, in this tutorial you learn how to change the password of a hard drive or a password encrypted. Very useful including in the case of partitions password and encrypted Flash Drive.
I showed in a tutorial in the past, how we can pay a Mac storage device. Formatting, encryption and password of USB drive, hard disk, SSD or any other compatible storage device.
In the above tutorial I showed how an external storage unit can be divided (flash drive, hard disk extern) in more parrots and How can we parize one of them. A very effective method if we have an example of an external hard drive with large storage space, il We share in multiple partitions, but one of them we want to be with the password to protrude our sensitive data. Pictures, videos, documents, etc.
Once passworded and encrypted a partition or the entire storage unit, it is good for the password to be kept in a safe place. The encryption password of an external hard can not be recovered. In the best case, when you set the password for a hard drive or flash drive, you also entered a word or a help phrase, which will give you a hint.
Tutorial: Partitioning and password (encryption) Flash drive / hard drive on Mac
If for different reasons we want to change the password for encryption of a Mac storage unit, then things are simple.
How to change the password of a hard drive or flash drive encrypted on macos
We take the scenario in which we have a flash drive SanDisk Ultra USB 3.0 256 GB, divided into two partitions formed in two volumes: APFS and APFS Encrypted (with password). At the last, called ”Stealth"We want to change his password.
1. To change the password of a partition / volume, first of all we must know the current password. We enter the volume encrypation password. "Enter a password to unlock the disk“.

2. We open the disk utility utility (by default on the macos), and in the left bar we select the encrypted volume for which we want to change the password.
Once selected we go a menu to: File → Change Password…

3. A dialog box will open in which we have to enter the old encryption password, then twice the new password and a word or a phrase, in case we forget it.

Click on the "Change" button to change the password.
This operation to change the password of an encrypted external hard drive or a flash drive will not affect the data stored on that volume.
And as a clarification, an external hard disk or Flash Drive encrypted APFS can never be accessed on Windows PC. Normally, no simple disk can be accessed APFS, if no specific drivers and applications are installed on Windows that will allow the APFS volumes to be read.