class UserActions {

    private UserActions() {
    }

    @Nullable
    public static SecureHash generateSecureHash(Map<String, Object> properties) throws GeneralSecurityException, IllegalArgumentException {
        try (SecureString pw = getUserPasswordProperty(properties)) {
            if (pw != null) {
                if (pw.isEmpty()) {
                    throw new IllegalArgumentException("Password must not be empty");
                }
                return SecureHash.of(pw);
            }
            return null;
        }
    }

    @VisibleForTesting
    @Nullable
    static SecureString getUserPasswordProperty(Map<String, Object> properties) {<FILL_FUNCTION_BODY>}
}

        String value = DataTypes.STRING.sanitizeValue(properties.get(CreateRolePlan.PASSWORD_PROPERTY_KEY));
        if (value != null) {
            return new SecureString(value.toCharArray());
        }
        return null;
    
<no_super_class>