public byte [ ] getMyZid ( ) { ZrtpCacheEntry ce = cache . get ( LOCAL_ZID_KEY ) ; if ( ce != null ) { return ce . getData ( ) ; } else { byte [ ] zid = new byte [ 12 ] ; platform . getCrypto ( ) . getRandomGenerator ( ) . getBytes ( zid ) ; cache . put ( LOCAL_ZID_KEY , zid , null ) ; platform . getLogger ( ) . log ( "[ZRTP] created new ZID=" , zid ) ; return zid ; } }
Retrieves this clients cached ZID . If there s no cached ZID i . e . on first run a random ZID is created and stored .