public synchronized String get ( ) { ConfidentialStore cs = ConfidentialStore . get ( ) ; if ( secret == null || cs != lastCS ) { lastCS = cs ; try { byte [ ] payload = load ( ) ; if ( payload == null ) { payload = cs . randomBytes ( length / 2 ) ; store ( payload ) ; } secret = Util . toHexString ( payload ) . substring ( 0 , length ) ; } catch ( IOException e ) { throw new Error ( "Failed to load the key: " + getId ( ) , e ) ; } } return secret ; }
Returns the persisted hex string value .