Hash - one-way function

I am developing an applet in the card which needs a one-way function to encrypt the variable I am trying to send. I don't want the other party to know which my variable is, so that is why I need to send it cipher. The other party will have the same data and applying the same function can know if mine was correct but without getting new information.
Is there any on-way funcion like HASH function implemented on the card?. How can I implement such a thing?

Check the class MessageDigest in javacard.security, there you can perform a one-way function.

Similar Messages

  • One way hash function in java

    Simply i want to save a password entered to a java program and save it in a MySQL database
    Here I want to encrypt that password and save it in the database.... I prefer one way hash function encryption because it fulfills my need.
    SHA-1 is the best in java now as I read from a article, is it?
    What I need is that if someone can post a complete code which uses SHA-1 (if it is the best preferred one).
    I've tried some codes published in the web but didn't work
    one code worked very well but when I entered characters like "@#$%%" it failed.
    Thank You!!!

    797241 wrote:
    I've search using your key terms and got a good code that works ("java sha-1 example")
    thanks for that
    I didn't got that when i was searchingHard to believe.
    So suggesting that working link was enough though you've put some other annoying comment tooIt is considered extremely bad mannered just to ask for code. If you have presented code that has problems and ask for help in fixing the problems you will normally get help but just to ask for code implies you are very lazy.
    thanks for that too
    I would rather prefer if you would have written "You are not going to get an answer, get the hell out of here!!!"Now that would have invoked the wrath of the moderators!
    P.S. Just using a SHA-1 digest is insecure as the result is open to a dictionary attack. You should use a randomly seeded digest with both the random value and digest value being stored in the database.

  • How to updated all program in one way

    Hi All,
    I have 3000 list of programs and i want to insert one(same) function module  in every programs so is there any way through which i can insert it instead of hard coading?
    Because there is no sence to edit 3000 program.
    Please Help me.

    Hi Pradeep,
    First create Z table or local file where your will store all program name then create new program with below logic
    1) Fetch report name into internal table say it_program
    2) Loop on it_program into wa_program
    2.1) READ REPORT wa_program INTO it_code . Check sy-subrc. IF 0 then go ahead with next step else CONTINUE.
    2.2) Add your logic to insert new FM. Update program line to table it_code.
    2.3) INSERT REPORT wa_program FROM it_abapcode.
    Endloop.
    I think you will face challenge in writing logic which would insert new line of code. All 3000 program will have different logic and different structure. I think you can loop on it_program and check for START-OF-SELECTION or END-OF-SELECTION. You can add your new FM just after start-of-selection or just before end-of-selection.
    Let me know if you need more help.. 
    Regards,
    Jigar Thakkar.

  • Active Directory: One Way Trust from NT Domain to 2003 Domain being upgraded to 2012 R2

    We have an old legacy NT 4 domain that is slowly being decommissioned. (Slowly is the key word) Currently there is a one way External Trust between those NT 4 domains and a child domain that is at 2003 functionality. We are in the middle of upgrading
    those child domain and the root domain to 2012 R2.  My only concern right now and I can't seem to find concert proof either way, but will that external one way trust break when upgrading the forest and domain functionality to 2012 R2 once we
    have all our DC's upgraded?  I have read articles on how to get that trust to work in a 2008 R2 domain and of course it is working with the existing 2003 domain.
    In theory the trust should break, correct?  However, I know there are some security changes among other things in 2012 that may or may not work. 
    Kristopher Turner | Not the brightest bulb but by far not the dimmest bulb.

    Yes.  We are working with the client to migrate any dependencies off these 3 NT legacy domains. We will be able to decommission 2 of the 3 without any issues. However, they still have an old NT box running SQL 6.5 databases for a application still in
    production. Yes, they are very aware that NT isn't supported, that that version of SQL isn't supported, and that this will hold up their upgrade.
    Our plans for them will be to deploy all new Windows Server 2012 R2 domain controllers but keep the domain and the forest functionality at 2003 in order to support that final NT Legacy domain until they can get that application migrated.
    Once that NT domain is decommissioned then we can raise the functionality of the rest of their domains from 2003 to 2012 R2.
    Kristopher Turner | Not the brightest bulb but by far not the dimmest bulb.

  • One Way Trust, Start with RWDC Then Go To RODC?

    So, we have an internal network and a DMZ network in play here.  I'm attempting to setup a one way trust so resources on the DMZ network can be managed from the internal network.  Internal network has RWDCs in its domain, and the DMZ has its own
    RWDCs in its own domain and a RODC from the internal network's domain.  The internal network's RODC is in its own site in AD and is confirmed to be communicating with the RWDCs in the internal network.  The RODC is not an authoritative DNS server,
    but can host a secondary zone or stub zone.  The functional level of the internal domain is 08r2 and the DMZ domain is 2012r2, if that matters.
    The task is to setup the one way trust, and its proving a bit difficult.  So far I've attempted both Conditional Forwarders or stub zones on the RODC and the DMZ RWDC, no dice.  There are no observed DNS replication problems within the domains
    themselves and using ping and nslookup, I've confirmed that DNS resolution is working between the RODC and the DMZ RWDC.  When I try to create the trust from the DMZ RWDCs, it fails saying the specified domain cannot be contacted.   Based on what
    I've read online in other posts and my inability to get around it, it seems that a trust requires a RWDC at each end to function.  If this is not the case, I would love to hear how it can be setup with a RWDC at one and and a RODC at the other.
    Now, if its correct that the trust requires two RWDCs to setup, what if it was setup with two RWDCs and then one of the RWDCs was removed and replaced with a RODC?  I guess what I'm asking is does it just require a RWDC at each end to be setup, or does
    it also require a RWDC at each end for the trust to function properly on an ongoing basis?

    Hi,
    Sorry it takes me some time for testing and reply.
    I've confirmed that it is fine to replace an RWDC to RODC after trusting is setup. You can set it in your environment. 
    If you have any feedback on our support, please send to [email protected]

  • Call Pickup - Users experience One Way Audio when using Call Pickup Orbit to pickup internal calls with internal Lync 2010 Callers

    Hi
    Noticed an issue where when using Call Park Function with users you receive one way audio when answering the call
    The scenario is
    1) If a user is internal and is homed on Lync 2010 Pool and calls an internal user who is homed on a Lync 2013 Pool and another internal user homed on a Lync 2013 Pool picks up the call with Call Pick Up orbit, Lync 2010 users only hears one way audio and
    same for user who has picked up call
    2) If the scenario is an External PSTN call or another Lync 2013 user these calls are fine
    In Lync Tracing logs a SIP/2.0 481 Call Leg/Transaction Does Not Exist error is returned
    Is this a known bug or expected behavior - Call Pickup is basically useless until all users are migrated to Lync 2013 as there is no way of a user knowing whether call is internal or external and if the user is on Lync 2010 or 2013, obviously in my
    large organization 2000 users no an overnight thing
    Coupled with the fact no Team Call Group\ Simultaneous Ring can be in place for Call Pickup to work im thinking Call Pick Up is not going to happen for awhile
    Is there any fixes\ developments that may help this issue or is there a setting I am missing

    Hi,
    Please install latest update for Lync Server 2010 and 2013.
    http://technet.microsoft.com/en-us/lync/dn146015.aspx
    If the issue persists, please enable logging tool on Front end and Mediation server to get trace for troubleshooting.
    http://blog.schertz.name/2011/06/using-the-lync-logging-tool/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Kent Huang
    TechNet Community Support

  • One RollOver function for all buttons?

    Is there a way to streamline AS3 code so that all buttons are controlled by one rollover function? The code below isn't working for me.
    function rollOverbtn(e:MouseEvent):void{
    e.target.gotoAndStop(2);
    trace("button HIT");
    function rollOffbtn(e:MouseEvent):void{
    e.target.gotoAndStop(1);
    btn1.addEventListener(MouseEvent.MOUSE_OVER, rollOverbtn);
    btn1.addEventListener(MouseEvent.MOUSE_OVER, rollOffbtn);
    The trace works which shows me that the function IS properly firing, but the rollOver effect is not hitting. I'm sure I'm doing this wrong as I am brand spaking new to AS3.

    You're welcome.  When you use MOUSE_etc events, and "target", the target can end up being a child within the object that has the event listener assigned.  currentTarget always points to the object with the listener assigned to it.

  • One way ping through new switch

    NetTechMike wrote:
    If a ping works one way, then it is almost always the firewall on the end of the connection
    PING isn't a one way traffic item. It is bi-directional.
    The ICMP echo request goes out and the reply is what you see at the command prompt when you get a "reply received"
    So, if PING really is replying with a proper response and not a "destination host unreachable" then there isn't a thing wrong on the routing side, it'll be the firewall.

    Hello!A few days back we installed a new switch (HP 1620-24G JG913A) for a new office inside our building. The switch is connected to the same one in our server room. The computers inside the office are functioning perfectly as far as the users are concirned. They can use network printers, open helpdesk tickets, access the intranet, internet, etc.
    However, even though everything was functioning well in the old office (the machines are the same ones), nothing going the other way can get through. They can't be pinged, Spiceworks doesn't recognize them (although they have agents installed), and, well, that's not nice.The two switches are configured identically, and googling for the solution hasn't turned up anything usable (for me). For now it's not a big issue, but I'd like to solve it, so that it wouldn't become a problem later.Any help...
    This topic first appeared in the Spiceworks Community

  • SHAREPOINT QUESTION: One way SYNC of files from SharePoint cloud to hard-drive

    SHAREPOINT QUESTION: One way SYNC of files from SharePoint cloud to hard-drive
    How does a person enable Sales reps to SYNC literature files from a cloud library down to their computer,.... but then not be able to have them accidentally delete the files by accident if they delete a file from their computer and then have it
    sync upwards again.
    Permission Level
    "Read" allows to download individual files but not SYNC down and there are too many files for them to go and download each file every-time.
    "View Only" is only visible on the browser and not useful when reps are in remote parts of the world.
    "Contribute" allows the sales reps to SYNC but if they delete a file from their computer, then it deletes it for all which is to much.
    There must surely be a way to allow a one way (cloud-to-hard-drive) SYNC to avoid folks from deleting files.
    Does anybody know how to d this or if not, how do I have Microsoft consider such a perceived weakness compare to dropbox

    You can achieve the functionality which you describe using the OneDrive (SkyDrive Pro) in Sharepoint 2013. You can setup read only folders to sync to achieve "one way" traffic. You will need Office 2013 locally to avail the full features of
    the coauthoring environment if you are looking into that as well.
    Sharing with everyone (Read Only): http://community.office365.com/en-us/b/office_365_community_blog/archive/2013/07/15/ways-to-quot-share-with-everyone-quot-in-skydrive-pro.aspx
    Some benefits of using OneDrive include the following:
    Users can take their documents offline with them and have them synchronize when they are online again.
    Users' documents can be synchronized across all client devices and servers where the files are stored and synchronized.
    Multiple users (online or offline) can work on documents at the same time, and the OneDrive for Business Windows Sync client will synchronize the changes between the users. If there are conflicts, users are prompted to resolve the conflicts.
    Users can share and collaborate on documents.
    Users can work from many locations, either online or offline, and work from many devices.
    http://technet.microsoft.com/en-us/library/dn167720(v=office.15).aspx
    Thanks, Ransher Singh, MCP, MCTS | Click Vote As Helpful if you think that post is helpful in responding your question click Mark As Answer, if you think that this is your answer for your question.

  • SCCM 2012 R2 cross forest with one-way trust feasible?

    We are planning to replace our existing SMS 2003 server with SCCM 2012 R2 (running on Windows server 2012 R2).
    Our requirements are to support client our Windows 7 client PC's in Domain A and also support Xen Desktop clients in a separate domain (Domain B) and forest. We have a one way trust established (Domain B trusts Domain A). The SCCM 2012 R2 server will be
    in Domain A the same as our current SMS 2003 server.
    What we want to do, at a minimum, using SCCM is:
    Client inventory (hardware, software, user) and package distribution.
    Is this do able or a no go? If not directly is there any work-around for this? Appreciate any helpful advice or feedback.
    I have made the below diagram to better illustrate the scenario:
    Note: Domain B does not have WINS implemented (Domain A does). Both domains are running DNS of course.

    Hi,
    The following blog describes the technical requirements that have been put in place for the support of cross forest communication. You could have a look.
    Quote:
    Inner-site Communication (site to site communication) exists in the form of both File Based Replication (SMB Port 445) and Database Replication (TCP/IP port 4022 by default).
    In order to install and configure a child site (primary or secondary), the child site server must be located in the same forest as the parent site or reside in a forest that contains a
    two way trust with the forest of the parent (CAS or primary).
    Site System Roles (MP, DP, etc.) with the exception of the Out of Band Service Point and the Application Catalog Web Service Point can be deployed in an untrusted forest.
    The SLP functionality as known in ConfigMgr 2007 is now performed by a Management Point. In this blog I will refer to this as the Lookup Management Point.
    Most of these items were taken from this TechNet article – please refer to the article for more information -
    Planning for Communications in Configuration Manager .
    For more information:
    http://blogs.technet.com/b/neilp/archive/2012/08/20/cross-forest-support-in-system-center-2012-configuration-manager-part-1.aspx
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.
    Thank you for your reply. The below appears to make it seem as though this can be accomplished without requiring a trust:
    http://blog.coretech.dk/kea/multi-forest-support-in-configmgr-2012-part-i-managing-clients-in-an-untrusted-forest/#comment-284522
    Not sure which is correct...

  • N95 Maps, One way streets

    Hi people, I have Uk maps installed on my phone but not navaigation option. When i plan a route (and use tracking function) The software for some unbeknown reason likes taking me down one way streets, bus lanes, all sorts. Can anyone shed any light as to why, do i need to upgrade to navigation option to solve this problem. There are many little bus lanes in norwich and is rather annoying.
    Cheers

    hey patriciaanne, what network are you on? im on vodafone. you say you upgraded to v11. and this solved yourprob. ive read so much bout upgrading im quite lost in how to do it. I remember reading doing it will invalidate warrenty but how can u do it on a vodafone branded phone?
    Any help much appreciated

  • HT1338 just what is the new software upgrade 10S 6.16. EVERY TIME I PUT NEW SOFT WARE ON MY IPOD 4TH GENERATION TOUCH IT MESSES UP MY IPOD IN ONE WAY OR ANOTHER. USUALLY IT CUTS IT OFF OF WI FI AND IT WON'T CONNECT!FI

    I am afraid to download the new update software ios 6.1.6. Because everytime I let it put new software on, It makes my Ipod 4th generation mess up one way or another. Usually it makes the wifi go off and I cannot get it back on. Then I can't even use the ipod!  I am having a problem now with it shuffling. Do both red x's one on each corner right top and left top need to be on for it to shuffle?  Thank-You; Sherry  PS, I do not have a Mac. I have a dell window 7. and I don't want windows 8. I have heard nothing but bad about it!

    Nope, though it did allow me to get some missing songs back onto my iPod. That's something. But neither "Back in Black" or "Dirty Deeds" show up anywhere on the Touch. Could this be because iTunes has no deal with AC/DC?
    Quite frankly, at this point, I'd really rather not have the "ease of use" of iCloud attached to the iPod. It's not like I change my playlists that much. It would just be nice to get what I want onto my MP3 player. Not sure which one it was: iCloud, Music Match or the Air Port but the only real result of all the $ I plunked down is seeing all of my Wife's 231 Christmas songs popping up on my laptop. Really don't want them here. She SURE AS **** is sick of seeing all of my stuff on her computer.
    Thanks again.
    B.

  • I added a contact to my iphone 4s and when I did a sync manually it is not showing up on my MAC in address book - please help....I checked off sync all contacts in iTunes  - does it only work one way from computer to phone?

    I added a contact to my iphone 4s and when I did a sync manually it is not showing up on my MAC in address book - please help....I checked off sync all contacts in iTunes  - does it only work one way from computer to phone?

    Is it because the new itunes looks different.
    View > Show Sidebar
    Then it should work just the same as on your old computer.

  • Jabber for IPhone over AnyConnect VPN calls to SIP Gateway - One Way Audio

    Hello,
    I am wondering if anyone has seen this before.  I have the latest version of Anyconnect for the IPhone and Jabber app, running on the newest version of CUCM 8.6 and Jabber 8.6.
    The Jabber phone registers fine and I can make internal calls without an issue.  I also can make external calls to H323 and HGCP PRI gateways without an issue.  However, when I make a call from the Jabber client that goes out a SIP gateway and SIP trunk I get one way audio.  I do not see any packets even trying to leave inside interface of the ASA headed toward the SIP trunk IP.
    I've also verified that useing the same VPN profile I can make 2 way audio calls out the SIP trunk from a softphone running on windows.
    Anyone have any ideas what could be the problem?
    Thanks.

    Hi,
    try to disable early media on 180 under sip profile settings for jabber client.
    HTH
    Anas
    please rate if itnis helpful
    Sent from Cisco Technical Support Android App

  • One way audio over VPN

    I have 2 Cisco 1941 routers with a standard IPSec tunnel between them. Data works fine, but VoIP is encountering a one way audio issue where the remote site calling cannot be heard but they can hear me.  This seems to match what I'm seeing in encaps and decaps. The quesion I'm having is why would the remote site be encapsulating all packets but the office router isn't decaping these audio packets. I isolated one phone specifically so that's why the SA is for only 1 host.
    Thanks!
    OFFICE ROUTER
       protected vrf: (none)
       local  ident (addr/mask/prot/port): (192.168.0.0/255.255.0.0/0/0)
       remote ident (addr/mask/prot/port): (10.90.91.6/255.255.255.255/0/0)
       current_peer REMOTE_IP port 4500
         PERMIT, flags={origin_is_acl,}
        #pkts encaps: 4104, #pkts encrypt: 4104, #pkts digest: 4104
        #pkts decaps: 375, #pkts decrypt: 375, #pkts verify: 375
        #pkts compressed: 0, #pkts decompressed: 0
        #pkts not compressed: 0, #pkts compr. failed: 0
        #pkts not decompressed: 0, #pkts decompress failed: 0
        #send errors 1, #recv errors 0
         local crypto endpt.: 192.168.0.227, remote crypto endpt.: REMOTE_IP
         path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet0/0
         current outbound spi: 0x69C77389(1774678921)
         PFS (Y/N): N, DH group: none
         inbound esp sas:
          spi: 0xEA4A3FF9(3930734585)
            transform: esp-3des esp-sha-hmac ,
            in use settings ={Tunnel UDP-Encaps, }
            conn id: 2095, flow_id: Onboard VPN:95, sibling_flags 80000046, crypto map: VPN_MAP
            sa timing: remaining key lifetime (k/sec): (4409444/1207)
            IV size: 8 bytes
            replay detection support: Y
            Status: ACTIVE
    REMOTE ROUTER
       protected vrf: (none)
       local  ident (addr/mask/prot/port): (10.90.91.6/255.255.255.255/0/0)
       remote ident (addr/mask/prot/port): (192.168.0.0/255.255.0.0/0/0)
       current_peer IP_OFFICE port 4500
         PERMIT, flags={origin_is_acl,}
        #pkts encaps: 4055, #pkts encrypt: 4055, #pkts digest: 4055
        #pkts decaps: 4099, #pkts decrypt: 4099, #pkts verify: 4099
        #pkts compressed: 0, #pkts decompressed: 0
        #pkts not compressed: 0, #pkts compr. failed: 0
        #pkts not decompressed: 0, #pkts decompress failed: 0
        #send errors 0, #recv errors 0
         local crypto endpt.: IP_REMOTE, remote crypto endpt.: IP_OFFICE
         path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet0/0
         current outbound spi: 0xEA4A3FF9(3930734585)
         PFS (Y/N): N, DH group: none

    Thanks Michal.
    1) I have taken these buffer captures. The capture associated with "outside" is short when compared with the number of packets from the "inside" capture in the amount that is most likely associated with the call we placed.
    2) Not NAT at all.
    3) No CBAC or ZBF, unless some default that I'm not aware of. Not sure off hand how to disable those.
    I did get this case through to TAC but after 3 hours we are left at comparing the capture buffers.

Maybe you are looking for