code: private String hashPasswordForShiro() {
      //Hash password
      HashFormatFactory HASH_FORMAT_FACTORY = new DefaultHashFormatFactory();
      SecureRandomNumberGenerator generator = new SecureRandomNumberGenerator();
      int byteSize = 128 / 8; 
      ByteSource salt = generator.nextBytes(byteSize);
      
      SimpleHash hash = new SimpleHash("SHA-256", password, salt, 10);
      
      HashFormat format = HASH_FORMAT_FACTORY.getInstance("shiro1");
      return format.format(hash);
    }
docs: Hashes a password the shiro way.
  @return