Coding and decoding

Hello
I need to send data to a server, I have encrypt the data, but I'm not able to send the encrypted data on the server. Do I need to encode the data, if so, then tell me how,

How can encode us / decode in blackberry, my data is a simple string.

First, choose a common algorithm that works on the side and the help that you can encrypt and decrypt. You can google for algo and serach on this forum for similar discussions.

Tags: BlackBerry Developers

Similar Questions

  • memory encoding and decoding

    Hi, I'm working on the project now.

    I use a program that someone else created and change to the new PDA device that is enough for us.

    I need to understand how the programmer coded the old way for me so to unstanding how interpetted the code registers 8 memory.

    well, from stractch...

    This give PDA code 8 memory registers...

    I think they are hex and his converts to binary.

    There are 26 bits...

    the code I will attach take these bits and decode out them...

    I don't understand what is happening in this code, so I was hoping that someone can help me by disabling things for.

    Propably you can connect the inputs/outputs (or read/write for the globals) of the vi decodeing and then boning with these data.

    Felix

  • Base64 encode and decode

    Hello

    I use opennssl for encoding and decoding base 64 and face to face some of the question, he refuses to randomly to encode or decode, to give me a result of 0 and not false BIO_SHOULD_RETRY... I'm trying to put the call in a while if return 0, but it does not work and so I can not decode or encode more...

    The code I am using:

    uint8_t* Tools::base64(uint8_t *input,  uint32_t length)
    {
            BIO *bmem, *b64;
            BUF_MEM *bptr;
    
            b64 = BIO_new(BIO_f_base64());
            BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
            bmem = BIO_new(BIO_s_mem());
            b64 = BIO_push(b64, bmem);
    
            // write data
        bool done = false;
        int res = 0;
        while(!done)
        {
            res = BIO_write(b64, input, length);
    
            if(res <= 0) // if failed
            {
                if(BIO_should_retry(b64)){
                    continue;
                }
                else // encoding failed
                {
    
                    qDebug("error while encoding base64");
                    done=true;
                }
            }
            else // success!
                done = true;
        }
    
         //   BIO_write(b64, input, length);
            BIO_flush(b64);
            BIO_get_mem_ptr(b64, &bptr);
    
            uint8_t *buff = (uint8_t *)malloc((bptr->length)+1);
            memcpy(buff, bptr->data, bptr->length);
            buff[bptr->length] = 0;
    
            BIO_free_all(b64);
    
            return buff;
    }
    
    uint32_t Tools::decode64(uint8_t *pInput, uint32_t inputLen, uint8_t ** ppOutput)
    {
            BIO *b64, *bmem;
            uint32_t readLen;
    
            (*ppOutput) = (uint8_t *)malloc(inputLen);
            memset((*ppOutput), 0, inputLen);
    
            b64 = BIO_new(BIO_f_base64());
            BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
            bmem = BIO_new_mem_buf(pInput, inputLen);
            bmem = BIO_push(b64, bmem);
    
            // write data
        bool done = false;
    
        while(!done)
        {
              readLen = BIO_read(bmem, (*ppOutput), inputLen);
    
            if(readLen <= 0) // if failed
            {
                if(BIO_should_retry(b64)){
                    continue;
                }
                else // encoding failed
                {
    
                    qDebug("error while decoding base64");
                    /*int reason;
                    BIO_get_retry_BIO(b64,&reason);
                    qDebug() << "reason of bio bug " << reason;*/
    
                    //dont know what to do ;-(
                    done=true;
                }
            }
            else // success!
                done = true;
        }
    
            BIO_free_all(bmem);
    
            return readLen;
    }
    

    If you have ideas do not hesitate to discuss it!

    Thanks in advance!

    Try http://qt-project.org/doc/qt-4.8/qbytearray.html#toBase64

  • SQL Loader: Help TRIM and Decode functions please

    Hello

    I have load data from a flat file, for some columns, I need to use the TRIM and DECODE functions. It's a pipe delimited file.

    I get a syntax error (one is lower) same error listed for GARNISH.

    SQL * Loader-350: at line xx syntax error.
    Expected ', 'or') ', found 'DECODE '.


    ===========
    , FINAL_BILL_DATE CHAR (30) "TRIM(:FINAL_BILL_DATE)".
    , BUSINESS_ID 'DECODE(:BUSINESS_ID,'B',1,'C',2,'E',3,'G',4,'O',5,'R',6,'T',7,'U',8,'H',9,-1) '.


    Can someone please help.

    Thank you
    Josiane

    Hello josiane.
    The error you receive leads me to believe that at some point before the DECODING on the BUSINESS_ID line, probably some line before the FINAL_BILL_DATE line, it is a syntactic error causing the quotes before DECODING actually put an end to some other syntaxes. Without any lines that might actually contribute to this, including details of the header, it's the best I can advise.

    Hope this helps,
    Luke

    Please check the answer as helpful or response, if it is so. If this is not the case, further clarification.
    Try to always provide create table and table insert to help members of the forum to help you.

  • Windows Media Center - TV live - installation via a TNT set reading and decoder

    I have problems to display live TV via Windows Media Center (version 6.0.6001.18254).  My apartment block still has an analogue ariel so I reinstalled the TV through a decoder DTT channels.  Media Center has implemented a TV Guide including only BBC 1 and 2, 1 of ITV, Channel 4 and Channel 5.  TV Guide is visible in access, but live TV does not work. Can anyone help?

    Hi Kim Dean,.

    (1) it worked very well?

    (2) remember to make changes?

    (3) you get an error message?

    Method 1: You can follow the steps mentioned in the link below

    Solve problems with watching TV on your computer

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-watching-TV-on-your-computer

    Method 2: Also, see the steps in the link below

    Troubleshoot Guide downloading problems in Windows Media Center

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-guide-downloading-problems-in-Windows-Media-Center

    You might want to know

    Set up a TV signal in Windows Media Center

    http://Windows.Microsoft.com/en-us/Windows-Vista/set-up-a-TV-signal-in-Windows-Media-Center

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer
    ***************************************************************************

  • How to use the case and decode to extract data

    Hello gurus of PL/SQL,.

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version

    I have a table in the following form-
    drop table TT2;
    create table TT2(College, Class,gender,status,fees) as select
    'IITB','MBA','M','P',255600 from dual union all select
    'IITK','MTech','M','P',300000 from dual union all select
    'IITD','MBA','F','P',450000 from dual union all select
    'IITKH','MBA','F','P',350000 from dual union all select
    'IITC','MTech','F','P',420000 from dual union all select
    'IITB','MTech','M','P',185000 from dual union all select
    'IITC','MTech','M','P',235000 from dual union all select
    'IITD','MBA','F','F',175000 from dual union all select
    'IITM','MBA','M','F',257000 from dual union all select     
    'IITKH','MTech','F','P',335000 from dual union all select
    'IITD','MBA','F','P',540335 from dual union all select
    'IITC','MBA','F','F',125089 from dual union all select
    'IITD','MTech','M','P',290756 from dual union all select
    'IITM','MBA','M','P',200000 from dual union all select     
    'IITKH','MBA','F','F',534990 from dual union all select
    'IITD','MBA','F','P',221000 from dual ;
    certain conditions of extraction are as follows-

    MATTER OF STATE
    College of 'IITB' and status = 'P'-'good WestRegion '.
    College of 'IITC' and status = 'P'-'good SouthRegion '.
    College 'IITD' and 'IITK' and status = 'P' and type = 'F' - 'female NothRegion spent.
    College not in 'IITK' and status = 'F' - 'Ex Kanpur Failed'

    Results-
    Region Statnding     Fees
    WestRegion Passed     440460
    SouthRegion Passed     655000
    NothRegion Female Passed     1386335
    Ex Kanpur Failed     1092079
    Used SQL
    I use the following query that only make sure of the case, but it's not how I want to exit, if I try to use the case to breast to decode then how to work on it.
    SELECT (CASE WHEN College in ('IITB') and status='P' then sum(fees) else 0 end) WP,
    (case when College in ('IITC') and status='P' then sum(fees) else 0 end) SP,
    (case when College in ('IITD','IITK') and gender='F' and status='P' then sum(fees) else 0 end) NFP,
    (case when College in ('IITK') and status='F' then sum(fees) else 0 end) ExKF
    FROM 
    TT2
    GROUP BY College, Class,gender,status
    SELECT CASE WHEN College in ('IITB') and status='P'
                        then 'WestRegion Passed'
                when College in ('IITC') and status='P'
                        then 'SouthRegion Passed'
                when College in ('IITD','IITK') and gender='F' and status='P'
                        then 'NothRegion Female Passed'
                when College in ('IITK') and status='F'
                        then 'Ex Kanpur Failed'
                else 'Others' end region_standing,
                sum(fees) fees
    FROM TT2
    GROUP BY  CASE WHEN College in ('IITB') and status='P'
                        then 'WestRegion Passed'
                when College in ('IITC') and status='P'
                        then 'SouthRegion Passed'
                when College in ('IITD','IITK') and gender='F' and status='P'
                        then 'NothRegion Female Passed'
                when College in ('IITK') and status='F'
                        then 'Ex Kanpur Failed'
                else 'Others' end;
    
  • The URL encoding and decoding in OSB

    Hello

    Do we not have out-of-box solution in OSB decode XML that is encoded in URL and encode XML to the URL encoding. If yes how can I do.

    It is perhaps a fundamental question. I can't understand. New on OSB.

    Thank you
    Sham.

    encode an XML to URL encoding format

    No function out of the box I know, I think that you will need a legend of Java to do... I was wondering why you need that...

    It's the doc... Adding and configuring Actions of legend of Java in the stream of messages
    http://docs.Oracle.com/CD/E23943_01/dev.1111/e15866/tasks.htm#OSBDV164

    See you soon,.
    Vlad

    It is considered good etiquette to the answerers rewards with points (as "useful" - 5 pts - or 'correct' - 10pts)
    https://forums.Oracle.com/forums/Ann.jspa?annID=893

  • analyze and decode with the variable SkinValue

    I have a problem. I do a game and I want my player to change skin when he entered the plan of 'world '.

    I have 2 versions of fla files. One for a PC version and one for the version of android.

    In my "PC version" the code with skinValue works and it is not in my "Air for Android version.

    In my version of PC, I have a player class named player.as:

    public function Player(stageRef:Stage, walkRate:Number, targetBuffer:Number){
    gotoAndStop(“default”+skinValue);
    ….
    public function startWalking;
    gotoAndStop(“walk”+skinValue);
    ....
    public function stopWalking(e:Event):void{
    removeEventListener(Event.ENTER_FRAME, walk);
    gotoAndStop("default"+skinValue);
    In my Engine class (where the game is controled) Engine.as :
    
    
     var isMap:Boolean = thisBack == “monde”;
        if (isMap) {
        player.skinValue = “car”;
        }
        else {
        player.skinValue = “”;
        }
        }
    

    My player'got extra frames for the one named "walkcar" and "defaultcar". and it's WORKING GREAT!

    But in my version of AIR, I got this error:

    Error #2109: Frame label not found defaultnull in the defaultnull scene.

    at flash.display::MovieClip/gotoAndStop()

    at com.laserdragonuniversity.alpaca::Player() [C:\Users\stephanberger4\Desktop\31 aout\La Bush tactile\com\laserdragonuniversity\alpaca\Player.as:28 mad]

    at com.laserdragonuniversity.alpaca::Engine/createBackground() [C:\Users\stephanberger4\Deskt op\31 aout\La Bush tactile\com\laserdragonuniversity\alpaca\Engine.as:143 mad]

    at com.laserdragonuniversity.alpaca::Engine/configLoaded() [C:\Users\stephanberger4\Desktop\3 1 aout\La Bush tactile\com\laserdragonuniversity\alpaca\Engine.as:108 mad]

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at flash.net::URLLoader/onComplete()

    I am looking for what could be the problem and it seems that JSON causes this error.

    The version of my PC I have in my engine.as file:

    private function linesLoaded(e:Event):void{
                linesData = JSON.decode(speechLoader.data);
    ...
    private function configLoaded(e:Event):void{
                configData = JSON.decode(configLoader.data);
    

    I need to change to 'decode' by 'analysis' for my version of android, and it seems that it is the problem for my Skinvalue! When it is 'parse'... it won't!

    No idea why?

    THX!

    Found the solution! It was simply a problem of initialization. I just had to add = ' ' at the end of 'public var skinValue:String.'

    So it was not at all a problem of definition. Just initialization problem...

    Thanks anyway,

  • SELECT statement and decode.

    Hi all.
    I'm working with decode them but I get the wrong result. the following code shows the first not the U04 U02, U03 U01, I want to show all u01 until
    U04 here is the code.
    SELECT id, id2 ,
    SUM(DECODE(id,55,AMOUNT,0)) TP,
    SUM(DECODE(ID,56,AMOUNT,0)) COMP
    FROM table
    where id2 in('u01','uO2','u03','u04')
    AND ID IN ('55','56')
    GROUP BY ID,ID2
    any suggestion?


    Sarah

    You do not have all the lines where id2 in('u03','u04') and in id ('55 ', ' 56')

  • How read text file and decode

    Hi, I have a file which consists of 2 columns, it is first of all time/date stamp and 2nd is ON / OFF text.

    I would like to determine the time when the text is ON or OFF.

    I am not able to analyze the data in separate columns 2 and then read, can someone help me on this?

    The example of the file is attached.

    I was going to throw away the solution, but bob and cruz are probably right, that he is HW.

    What is the problem with your vi above, is that you are matching the model from the OFF, but you don't have a table, so your search through your entire text file and on the OFF first display you text in front of her. You must first create a picture of your spreadsheet from the read text file string. This can be done either by using a string of worksheet function array or as cruz said the spreadsheet file. Im not sure of your desired end result, but from there you can feed in a for loop and find each item ON or OFF.

    That should help you get started.

  • My documents and downloads are coded, and now the HP Support Assistant has stopped working

    First my 'docs' have been encrypted, now my downloads are encrypted and the "Support HP sat down. ' 'stopped working', when I try to open it, it is"encrypted", the '

    Recovery Manager"is also encrypted. Message is: 'looking', but do not get a reply box to tell me what the problem is.  Now I'm so frustrated!

    Help, please!

    Carolyn

    Hi Carolyn,

    1. what operating system is installed on your computer?

    2. have you made any recent hardware or exchange of software on your computer before the show?

    3. you receive an error code or message?

    4. what exactly happens when you try to open my documents and file downloads?

    5. have you well any type of encryption, or if you are aware of what it is done on your computer?

    What version of the operating system Windows am I running? :

    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    Please follow the steps and the link:

    Method 1:

    Decryption of a file:

    1. Right click on the file you want to decrypt, and then click Properties.
    2. Click Advanced.
    3. Click to uncheck the checkbox encrypt content to secure data to decrypt the data.
    4. Click OK to close the Advanced attributes dialog.
    5. Click OK to close the Properties dialog box.
    6. If the folder contains files that it contains, the confirm attribute changes dialog box appears. You can choose to decrypt only the folder. But it will decrypt all the files currently contained in the file.

      If you want to decrypt the contents of this folder, click apply changes to this folder, subfolders and files, and click OK , then check the issue.

    If you are still having the same problem, follow the next method.

    Method 2:

    I suggest to start your computer in safe mode with network and run Microsoft Safety Scanner because it might be an unwanted virus.

    Step 1:

    Start your computer in safe mode with network and check the number: http://Windows.Microsoft.com/en-us/Windows7/advanced-startup-options-including-safe-mode

    Step 2:

    Scan your computer by using the Microsoft Security Scanner by clicking Download now:

    http://www.microsoftsafetyscanner.com/

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    I hope this helps.

  • Hierarchy with as3 coding and to remove children

    To give a brief overview of what's going on here.  I'm building a personal site where I have a navigation, and I have other subnavs inside some pages.  Such as if I'm going to 'work' inside job I 'motion', 'web' and 'print '.  Some examples of code to a button on the navigation:

    nav_mc.personalbtn_mc.addEventListener (MouseEvent.CLICK, buttonClick2);

    function buttonClick2(event:MouseEvent):void {}

    gotoAndStop ("personal");

    function workss_mcExists (): void {}

    if {(workss_mc.stage!=null)}

    trace ("YES workss does exist");

    removeChild (workss_mc);

    { } else {}

    trace ("NO workss does not exist");

    }

    }

    workss_mcExists();

    function motionss_mcExists (): void {}

    if {(motionss_mc.stage!=null)}

    trace ("YESdudemar");

    removeChild (motionss_mc);

    } else {

    trace ("NO");

    }

    }

    motionss_mcExists();

    function workExists (): void {}

    if {(work_mc.stage!=null)}

    trace ("YES");

    removeChild (work_mc);

    } else {

    trace ("NO");

    }

    }

    workExists();

    function objectExists (): void {}

    if {(workss_mc.stage!=null)}

    trace ("YES");

    removeChild (workss_mc);

    } else {

    trace ("NO");

    }

    }

    objectExists();

    function home_mcExists (): void {}

    if {(home_mc.stage!=null)}

    trace ("YESdudemar");

    removeChild (home_mc);

    } else {

    trace ("NO");

    }

    }

    home_mcExists();

    function workpersonalExists (): void {}

    if {(workpersonalss_mc.stage!=null)}

    trace ("YES");

    removeChild (workpersonalss_mc);

    } else {

    trace ("NO");

    }

    }

    workpersonalExists();

    }

    It seems to me that actionscript will read all the way down to the bottom when looking for objects.  For example: the first if statement where she asked if workss_mc exists or not, which works if it is upstairs, but if I move it to the bottom, it won't work.  Does anyone have any idea how to fix this or bypass?

    Thanks in advance!

    This is the correct code, but if you goto a frame whereunimetal_homeref_mc doesn't exist, you'll still get an error message.

    to remedy this, you could declare all your clips as part of this code and then check if the object is null:

    pistolwreck wrote:

    var unimetal_homeref_mc:MovieClip;
    
    unimetal_homeref_mcnav_mc.workbtn_mc.addEventListener(MouseEvent.CLICK, buttonClick1);
    
    function buttonClick1(event:MotionEvent):void {     gotoAndStop("work");     stage.invalidate();     stage.addEventListener(Event.RENDER,renderedF);}
    
    function renderedF(e:Event) {     unimetal_homeref_mcExists();}
    
    function unimetal_homeref_mcExists():void {if(unimetal_homeref_mc!=null){     if (unimetal_homeref_mc.stage!=null) {          trace("YESdudemar unimetalhomeref exists");          removeChild(unimetal_homeref_mc);     } else {          trace("NO home ref does not exist");     }}}
    
  • using nvl2 and decoding

    Hi Experts,
    Here, my requirement is if column values is null or zero IT must go to zero if it is to have a value, it must pass value + concat a symbol '%'.

    I tried something like this

    Select nvl2 (year, concat (year, '%'), 0) in the sale

    It manages only null values, when I train with Decode I get ora-01722 error.


    someone can help me.


    Thank you
    KSS.

    OK, try:

    select CASE WHEN NVL(year,'0') = '0' THEN '0' ELSE concat(year,'%') END val
      FROM SALES;
    

    Published by: Seanmacgc on July 15, 2009 04:13

    Or:

    select CASE WHEN NVL(year,0) = 0 THEN '0' ELSE concat(TO_CHAR(year),'%') END val
      FROM SALES;
    

    You should post your data types too.

  • New firmware with RDS and WMA lossless

    in the next version can you include RDS and WMA lossless format support... Also a kind of if possible noise reduction

    Only firmware can not give us RDS.  The FM radio chip currently used in the rocket does not support it.  The cool SlotRadio player has the RDS capability.  Perhaps, in the future, the Sansa support RDS, but it's a hardware problem, at this point.

    It is very nice to be able to identify this cool air currently on the air.  RDS has grown slightly in recent years, as it started with very poor implementation, according to the broadcaster.  We would often inundated with stupid shit like the slogans of the station, raffles and contest presentation texts, the temperature today in Hoboken, NJ and other.

    The extent of the wma lossless, consider that once you do business with "Lossless", it is a question of efficiency of compression, a platform practice coding and decoding smooth at the end of the player.  Oh, and good support for tag.  FLAC works very well and he has the promise to be around as a standard for archiving for years to come.

    WMA has the advantage of being native to Windows Media Player, a platform that is relatively easy to work and convenience in the form of marking.  I have my reservations about a good implementation, see the debacle on WMA Pro for example.  Microsoft may be their own worst enemy, well, well, they are their own worst enemy, because it seems obvious that they cannot just try their own interfaces and fix the quirks.

    Spend a lot of time with the chicken, I can assure you that it is not unlike a gourmet meal with toothpicks.  And throw in one of those new titanium sporks for good measure.

    FLAC supports ID3 tags, is open source and works very well.  For a codec I would use mainly as a reference for the archiving of the original PCM of disc, leaving open to the "nuances" of Microsoft is not simply attractive.  I remember the nonsense to use Microsoft Word for many years and his worrying propensity for lack of reverse compatibility.  Writing reports in the fire service, I had to always remember to save copies of format "rtf" so that computers with different versions of Microsoft Office can read the documents.

    Bob

  • For the binary cache as a BLOB or file system?

    I posted this question of AIR on the Flex forum, which did not get much attention, so now I try here which seems more ideal.

    My question in detail:

    Would it be best to store binary files (Images and SWF files) as blobs in the database or to have a URI pointing to them on the user the system of files?

    I am above all a Developer Flex, which did not have much time to development of databases, but realizes there is 2 options to be taken for the storage of binary files in an AIR application.  Given that I have not been exposed to the db development I'm not sure which is the best way.

    You are right there are two options, and they are both commonly used.

    Storage on the file system is a little easier to implement for many and can be a little more proformant with less coding and decoding in progress.  But he has an increased risk of problems of syncornazation since there are many ways for objects of file to be modified, moved, or deleted without changing anything and the database.  Thus, we should build logic that will check the existence of the file at the level of the URI before trying to serve.

    Store the file in the database reduces the problems with syncornazation.  But it takes a little longer to implement and could involve much more data in the database itself, which may or may not be a problem depending on the configuration.

    But either is a choice of acceptiable and a little work with the various advantages and disadvantages of a.

Maybe you are looking for