MessageDigest update/digest method
Hi everyone!
I'd like to know if there's a way to invert operations of update/digest methods.
See the code belove:
byte b[] = ...;
byte d[];
MessageDigest md;
try {
md = MessageDigest.getInstance ("MD5");
} catch (NoSuchAlgorithmException a) {
md = null;
md.update (b, 0, 7);
d = md.digest ();
.....Having d byte array, can I obtain original array b from which I started.
Thank you very much all in advance
Diego
thank you
Similar Messages
-
Hello,
I'm currently writing an iPhone app which connects and authenticates with a server written in Java. Due to security, I want to send the user data encrypted.
On the server I use:
byte[] bSalt = base64ToByte(salt);
MessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.reset();
digest.update(bSalt);
byte[] bToHash = digest.digest(toHash.getBytes("UTF-8"));
for (int i = 0; i < 3; i++) {
System.out.println(byteToBase64(bToHash));
digest.reset();
digest.update(bSalt); // More secure?
bToHash = digest.digest(bToHash);
By now, I managed to hash in Objective C, too, but the salt is the problem. For getting the same hashing results in ObjC, I need to know what MessageDigest.update does. Does it simply compute an OR with the current digest and the salt or what does it do? Thanks for your help.
Greetings
NaznazMessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.reset();The reset() is unnecessary here. You've just created the MessageDigest object. Resetting it won't change anything - there is nothing to change yet.
digest.update(bSalt);
byte[] bToHash = digest.digest(toHash.getBytes("UTF-8"));
for (int i = 0; i < 3; i++) {There is little to gain from repeating the digesting algorithm three times.
System.out.println(byteToBase64(bToHash));
digest.reset();Almost certainly wrong. You are throwing away all prior state here, including the salt.
digest.update(bSalt); // More secure?More secure than what? I suspect you can omit this too.
bToHash = digest.digest(bToHash);That should almost certainly be update(), not digest(). digest() is the last thing you call, when you get to the last piece of input.
I need to know what MessageDigest.update does.It's algorithm-dependent, obviously. In this case you are using SHA-256 so you would need to look up that algorithm. It's lengthy!
Does it simply compute an OR with the current digest and the saltDefinitely not. It applies the specified digest algorithm to its current state and the next piece of input you provide. This code should mirror the code you say you already have working in Objective-C.
But none of this is encryption. It is message-digesting. The result cannot be decrypted. -
I am unable to update my App store Updations. the reason being billing problem asking to update payment method.Many a times i updated my credit card details but refusing from the system .how can i update my app store updations like Face book etc....Using ! phone 6plus .IOS8.3
What do you mean by 'refusing from the system', if you are getting an error message then what does it say ?
For a credit card to have a chance of being accepted it needs to be registered to the same name and address (including format and spacing etc) that you have on your iTunes account, and have been issued by a bank in the country where you and your iTunes account are. If it is and if you are getting a 'declined' message then you could check with the card issuer to see if it's them that are declining it, and if not then try contacting iTunes Support (these are user-to-user forums) and see if they know why it's being declined : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
If when trying to download you are getting a message about a 'problem with a previous purchase' then that implies that iTunes wasn't able to collect the money for your last purchase. If that is the case then you won't be able to download anything else (including app updates) until you've paid off what you owe : Pay an unpaid balance in the iTunes Store - Apple Support
If you aren't getting the 'problem with a previous purchase' message then try logging into your account (not when trying to download something) and see if you get the 'none' option so that you can remove the card's details and be able to download updates to your apps : Change or remove your payment information from your iTunes Store account (Apple ID) - Apple Support -
How to update payment method,once generated payment doc through F-58.
Hi Experts,
I want to update payment method,once generated payment doc through F-58.
1)Maintained payment method in XK01
2)Maintained the same in Invoice Number
But, i am not able to generate payment method in payment doc through f-58.
It can possble through F110,but why not in F-58.
Please let me know,whether is it possible or not.
Thanks
Kishore.JHi Ravi,
Thanks for your reply.
I gave my payment method,bank and check lot details in F-58 and generated payment document f-58.But,i am not able to find payment method in payment document.
Thanks
Kishore.J -
BAPI to update Payment Method (BSEG-ZLSCH)
Hi ABAP Gurus,
Good day.
I have looked for a FM / BAPI that can update the Payment Method (BSEG-ZLSCH) of documents and tried some such as
CHANGE_DOCUMENT and FAGL_CHANGE_DOCUMENT_ADD. Unfortunately, Payment Method is not being updated. I have initially debugged the standard transaction but I can't find a specific FM or set of FMs that update the Payment Method.
With these, i have question:
Can you kindly suggest a BAPI or FM that can update Payment Method (BSEG-ZLSCH)?
Thank you very much in advance for all your help.
Best regards.
RainnierHi Rob,
Thanks for your checking my question.
Yes, I can update my sample document via FB02. But when I trying some standard FMs, I can;'t update the Payment Method.
I noticed though that other documents can't be updated via FB02 (payment method is uneditable; perhaps needs to be configured).
Thanks in advance for your time and reply. -
Hi,
I am trying to update payment methods of employees by the below script, but it is throwing an error.
Has anyone encountered this before? Please suggest.
Error is :- -20001:-ORA-20001: HR_FLEX_VALUE_MISSING: N, COLUMN, SEGMENT3, N, PROMPT, Account Name
Script:-
Declare
pp_comment_id NUMBER;
pp_external_account_id NUMBER;
pp_effective_start_date DATE;
pp_effective_end_date DATE;
pp_object_version_number NUMBER;
V_ERROR VARCHAR2(1000);
l_cnt number := 0;
Cursor C1 Is
select * from PAY_PERSONAL_PAYMENT_METHODS_F
where BUSINESS_GROUP_ID = 12087
and assignment_id = 49729;
Cursor C2(p_assignment_id NUMBER) Is
select * from pay_external_accounts
where EXTERNAL_ACCOUNT_ID IN (select EXTERNAL_ACCOUNT_ID from PAY_PERSONAL_PAYMENT_METHODS_F
where BUSINESS_GROUP_ID = 12087 and assignment_id = p_assignment_id);
BEGIN
FOR R1 in C1 LOOP
FOR R2 in C2(R1.assignment_id) LOOP
BEGIN
SELECT OBJECT_VERSION_NUMBER INTO pp_object_version_number
FROM PAY_PERSONAL_PAYMENT_METHODS_F
where assignment_id = R1.assignment_id;
END;
BEGIN
hr_personal_pay_method_api.update_personal_pay_method(p_validate => FALSE,
p_effective_date => TRUNC(SYSDATE),
p_datetrack_update_mode => 'CORRECTION',
p_personal_payment_method_id => r1.personal_payment_method_id,
p_object_version_number => pp_object_version_number,
p_segment3 => R2.segment4,
p_segment4 => R2.segment3,
p_comment_id => pp_comment_id,
p_external_account_id => pp_external_account_id,
p_effective_start_date => pp_effective_start_date,
p_effective_end_date => pp_effective_end_date
l_cnt := l_cnt + 1;
Exception
when others then
v_error := v_error || sqlcode || ':-' || sqlerrm;
DBMS_OUTPUT.put_line(v_Error);
END;
Commit;
End Loop;
End Loop;
dbms_output.put_line(v_Error);
dbms_output.put_line('Total Payment Methods loaded into the system: ' ||l_cnt);
END;Hello Saurabh
Why are you passing R2.segment4 in p_segment3 and R2.segment3 in p_segment4 ,this looks weird ,??
The error shows that SEGMENT3 is being updated with null value.Please verify what is being passed to SEGMENT3,
hr_personal_pay_method_api.update_personal_pay_method(p_validate => FALSE,
p_effective_date => TRUNC(SYSDATE),
p_datetrack_update_mode => 'CORRECTION',
p_personal_payment_method_id => r1.personal_payment_method_id,
p_object_version_number => pp_object_version_number,
p_segment3 => R2.segment4,
p_segment4 => R2.segment3,
p_comment_id => pp_comment_id,
p_external_account_id => pp_external_account_id,
p_effective_start_date => pp_effective_start_date,
p_effective_end_date => pp_effective_end_date
Hope this helps!
Gaurav -
how can l update my method of payment
Hiya!
Try following these steps:
1) Open iTunes on your computer and sign into your account.
2) Click the Account link under the QuickLinks list
3) There should be an Edit Button by your credit card and billing information. Click the edit button next to the section you wish to make changes to.
4) Enter in your changes. Make sure your billing address matches exactly what is listed on your credit card statement, becuase variation can lead to purchases not going through properly.
5) When all of the information is up to date, save your changes.
Hope this helps! Best wishes and good luck!
Message was edited by: RaineStar (Because typos are no fun) -
It keeps saying there's a billing problem with last purchase an to update payment method, but it keeps saying security code invalid. What do I do?
Type in the three digit code from the back of your credit/debit card to update your payment method/information. I had the same "security code invalid" response today... this is all it wanted me to do.
-
Problem in getting Updated EJB methods in JSC for a Same Project
I'm Using Sun Studio Enterprise for developing EJB sets.After that i'm importing the EJB set in to JSC & using it my Project.
If i need to add some more business methods/edit the business method i'm able to do that in the Sun Enterprise IDE.After editing the EJB ,redeploying & reimporting to JSC i couldn't get the updated version of EJB in my Current Project.
We could be able to get the updated EJBs,if we are using it in a new project other than using it in the Previous one.
It's being a great problem for me.Vat shall i do for this problem?Please help me,a project is in Pending stage because of this problem.
Regards
KajananHi MWH@Keystroke,
Thanks for your consideration of my problem.I also use an EJB layer built in Sun Enterprise for the backend to my Creator-based web application.My Current problem is getting the updated EJB sets to my current project.
For Ex:
If i add a new Business method called doSomething( ),then i should be able to get that method in JSC using FinalFacadeRemoteClient1.doSomething().
But after typing FinalFacadeRemoteClient. , doSomething() method is not displaying.
If i use that in a new project [Previously not used Same Session Facades]all the updated EJB business methodss are coming.I want to use updated EJBs in the project i'm already working.
Regards
Kajanan -
Unable to Update Payment Method
Hi,
I have a Skype number on my account. The annual auto-recharge on this subscription failed because I changed my bank card number a while back. However, I was unable to change the Payment method on your site – I added a new, valid, card and every time the browser got back from Visa, said “An internal error has occurred.” So then I added PayPal as a method, and then set the payment method to that, and although I did not get any errors, I am still seeing the warning all over the place that my Skype number is expiring in two days. Can comeone please contact me as to how to verify that my payment method has been changed successfully, and how to make the re-charge happen again before it expires?
Thanks,
GarrettI'm having a similar problem... I go through the process of changing my payment, by doing as instructed, to 'add payment'....... I put in my info with new credit card updates and test it (I know it works as I activated it at the bank directly), it fails... States internal error. Hope I'm not getting charged for the 'testing/verify' every single time!! This website is insane - you become like a rabid dog chasing it's tail. ARound & around. Nothing. No help. Wasted well over an hour of time & I'm sure about to have a stroke with my frustration/anger level. Skype hasn't even been working well lately with dropped calls constantly after a couple minutes, then stating each call lasted over 205 minutes!! EVer since Microsoft took over, Skype seems to have gone to crap. Time for app builders to invent another? Even falling apart Skype could make it easier by simply adding an 'update edit' for existing credit cards info, for simple updates with new cards. It's not rocket science.
Anyway, if anyone could be of any REAL asssistance (perhaps real moderators if they exist), other than more and more useless instructions that go around & around in an endless circle, that would be GREAT! Thanks in advance. -
Why i cannot download at appstore?? When i select.. It told to update payment method
To change your payment method see:Change or remove your payment information from your iTunes Store account (Apple ID) and if you continue to have problems, contact the support staff for the stores at http://www.apple.com/emea/support/itunes/contact.html
-
Not giving enough time to update payment method
i was emailed on thursday about my card not being able to be charged. i've been waiting for my new card to come in the mail. i checked on friday, and my order was still open. checked on sunday, and it was all cancelled. i'm aware that an item in the order was due to be released today, but 2 business days of notice is not enough time. had the order stayed open yesterday, i would have been able to fix the problem. already emailed support, and received generic responses. all i wanted was the order reinstated. i can even see the items in the order still, alongside items that have already been sent. i had a sale/promo on those items that i will now no longer be able to get if i were to simply reorder the items. which i won't even bother doing now.
Hello dragonborn1227,
As someone who makes the majority of her purchases online, I’m sorry to hear that your order cancelled without much forewarning. While this can happen if our systems aren’t able to verify your payment method provided on the order, we should notify you via email and ask that your payment method be updated as soon as possible in hopes of avoiding unnecessary cancellation. This is because a valid payment method must be attached to the purchase in order to secure it.
While we certainly want to consider solutions that make sense for both parties involved, we are not able to accommodate all requests made. Having said that, please know an order cannot be reinstated once cancelled, nor can we honor a sales price for a promotion that has since concluded. I truly apologize for any frustration this may cause.
Respectfully, -
HT2731 I need to update payment method. How do I access my account ?
I need to update my payment method. How do I?
I have the same problem and I didn't want to install that bulky iTunes on my Windows. Here's what Apple has on its website.
Changing your account information using an iOS device:
From your iPad's home screen:
Tap Settings
Locate and tap iTunes & App Stores on the left margin.
Tap on your Apple ID. (If you are not signed in, enter your Apple ID and password, and tap Sign In.)
Tap View Apple ID (then wait for like, forever).
Enter your Apple ID password.
To update your name, billing address, or payment information, follow these instructions:
In the Edit section, tap Payment Information.
Update the information that you want to change.
Tap the Done button when finished. -
Error after update installation Method Method 'Upgrade' in type ...
Hi guys after the install of some upgrade i can t access to my SharePoint site and i recive this error
Method 'Upgrade' in type
'Microsoft.SharePoint.WorkflowServices.WorkflowServiceApplicationProxy' from
assembly 'Microsoft.SharePoint.WorkflowServices, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c' does not have an
implementation.
Any idea?Microsoft has started pushing security updates for SharePoint along with windows update. If you are using automated patching tool , then you should be aware of this. Same thing happened to me. Our automated tool pushed through patches for share point security
update that needed SP1 as pre-requisite and our environment didnt have that. So it broke everything in all farms, 5 farms broken all together. What you can do is try to install any new security update . This will restart all the process of patching and make
your farm accessible.
I opened up a support ticket with microsoft so August security update broke my farm so just to fix it i had to install may security update for the shake of restarting the whole prcoess. If fixed the farm. I eventually ended up installing SP1 any way
since security update introduces office 365 tab in central admin and it was broken due to lack of SP1.
hope this helps.
sachin -
Trying to update payment method for VDS
I'm hoping someone here can help. I have kept my verizon.net email by signing up for the Verizon Domain Service last year. Since then the credit card I used to sign up has been cancelled (thank you hackers), and now I'm getting e-mails saying the Payment method is invalid. Makes sense. However when I use the link provided in the e-mail, it takes me to the manage my payment methods, but it says I have no payment methods, and does not give me a method to add a new payment method... I have gone round and round with Verizon, and nobody can seem to help. I've spent hours on the phone with them. I don't want to lose my verizon.net email. Please help.... ThanksJoe
OK - I'm getting closer to resolution of my problem associated with credit card info updating to retain my email address (keepmyemail.com) after switching phone providers. FYI: back in Oct 2014 - I opted to "keepmyemail.com" - then my credit card info changed in Feb 2015 - and then Verizon sent me an email stating that my credit card info had changed and provided directions on how to update my credit card info. When I attempted to "Manage" the info - I received this message: "You currently don't have any payment methods to update at this time". I swear I conversed with every department within Verizon several times spending many hours on the subject. In my opinion there is little if any communications between departments. I also sent detailed emails to both support and billing @domains.verizon.net - to no avail. I also tried their "phone tree" (automated operator) associated with "your domain services" {edited for privacy} - which is worthless. When you get to option # 5 associated with payment and renewal - you are told to "call customer service" who doesn't know how to deal with it. Finally, I found someone at their e-center (web-support) who knew this problem exists within Verizon. She told me they had a rash of similar problems in summer 2014 on into fall and that not so many problems were happening now. Their phone number is {edited for privacy}. I was told they can fix this problem - but takes several days - and they will get back to me. The reason this problems exists is due to some processing/programming problem Verizon has yet to fix. Somehow your account gets closed and crap begins to happen. Unless Verizon gets to the root cause of the problem - every time your credit card info needs to be updated - you may encounter a problem as I did along with many others. Verizon need to pin point and correct their programming problem, fix their phone tree associated with "your domain services", and educate their customer service department and their web-support department re said subject.
Maybe you are looking for
-
Colour for a Paticular row in alv grid,based on condition
Hi Master's. I want to display a paticular row in my alv_grid based on my condition a diffrent colour. The Entire row ? Regards, Abhisek
-
Double emails to one of my blackberry accounts
I am having an issue with my BBZ10. One of my email accounts has been receiving double emails for over 25 hours now. I do not have this problem with this email on any of my other devices, and only one of my emails has this issue. Is there anything I
-
PLEASE HELP ME, should i buy a macbook pro 2011?
please help me if the problems of the new model they can fix it with an update or if mac need to fix the entire model? please help me
-
GarageBand - How to set different BPM for each track?
Hi, for the last couple of years, I've been using Sony Acid on my PC to mix multiple tracks to make blends and remixes of songs. I've just switched of the a MacBook, and am trying to get Garage Band to do the same. I'm curious whether or not I can se
-
how to rename table using export and import utility ?? Thanks 10