public void onHTTPCupertinoEncryptionKeyCreateLive( IApplicationInstance appInstance, String streamName, byte[] encKey) { String mySharedSecret = appInstance.getProperties().getPropertyStr("cupertinoEncryptionSharedSecret", ""); String hashStr = mySharedSecret + ":" + appInstance.getApplication().getName() + ":" + appInstance.getName() + ":" + streamName; byte[] tmpBytes = MD5DigestUtils.generateHashBytes(hashStr); if (tmpBytes != null) System.arraycopy(tmpBytes, 0, encKey, 0, encKey.length); getLogger() .info( "ModuleEncryptionHandlerCupertinoStreaming.onHTTPCupertinoEncryptionKeyCreateLive[" + appInstance.getContextStr() + "/" + streamName + "]: *" + BufferUtils.encodeHexString(encKey).substring(28)); }
public void onHTTPCupertinoEncryptionKeyCreateVOD( HTTPStreamerSessionCupertino httpCupertinoStreamingSession, byte[] encKey) { String ipAddress = httpCupertinoStreamingSession.getIpAddress(); String queryStr = httpCupertinoStreamingSession.getQueryStr(); String referrer = httpCupertinoStreamingSession.getReferrer(); String cookieStr = httpCupertinoStreamingSession.getCookieStr(); String userAgent = httpCupertinoStreamingSession.getUserAgent(); IApplicationInstance appInstance = httpCupertinoStreamingSession.getAppInstance(); String streamName = httpCupertinoStreamingSession.getStreamName(); String sessionId = httpCupertinoStreamingSession.getSessionId(); String mySharedSecret = appInstance.getProperties().getPropertyStr("cupertinoEncryptionSharedSecret", ""); String hashStr = mySharedSecret + ":" + (httpCupertinoStreamingSession.isHTTPOrigin() ? "" : sessionId + ":") + appInstance.getApplication().getName() + ":" + appInstance.getName() + ":" + httpCupertinoStreamingSession.getStreamName(); byte[] tmpBytes = MD5DigestUtils.generateHashBytes(hashStr); if (tmpBytes != null) System.arraycopy(tmpBytes, 0, encKey, 0, encKey.length); getLogger() .info( "ModuleEncryptionHandlerCupertinoStreaming.onHTTPCupertinoEncryptionKeyCreateVOD[" + appInstance.getContextStr() + "/" + httpCupertinoStreamingSession.getStreamName() + "]: *" + BufferUtils.encodeHexString(encKey).substring(28)); }