protected String createDigest ( final String source ) { final DigestEngine digestEngine = DigestEngine . sha256 ( ) ; final byte [ ] bytes = digestEngine . digest ( CharUtil . toSimpleByteArray ( source ) ) ; String digest = Base32 . encode ( bytes ) ; if ( uniqueDigestKey != null ) { digest += uniqueDigestKey ; } return digest ; }
Creates digest i . e . bundle id from given string . Returned digest must be filename safe for all platforms .