I am still in the mood to dig this, so here is an optimized version that handle 0 lengths with irritate the compiler when overflow checking is enabled. Free and will allow to reuse the padded key buffers hence will yield better performance.
Init,Calc,Done in the best way, this i think for you to see and correct. I have saved the stuff locally so I will include, this as soon as time permits, into the development branch in some form.
I need to look at this HMAC stuff myself first today I've got lack of time and then decide where to put it. And I would put your name Kas Ob. The tests are just samples, and for the name mentioning, it doesn't worth it, as i think you might want to implement class for it or something. I just implemented your HMAC code. It is in the development branch now. Unit tests still need to follow. Thanks for sharing this, but I don't see what this provides compared to what the other mentioned solutions here already provide.
One thing though, you can use the first version supposed to be little slower for readability, it is just cleaner and easier to read, also the KeyPadding vars are dynamic based on the BlockSize, but it does need the checks for 0 length, as for the speed it will matter only with PBKDF2, about that, i will provide you with working PBKDF2, if not tomorrow morning then by the weekend i think will find the mood to prepare it for you.
I tried to do this and hope you like it, and of course please test it in case i missed something and use it as you see fit. I implemented first unit tests for the HMAC implementation you contributed the basis for now and set the array length of the two internal arrays dynamically now.
The right hand side of the first assignment results, according to the debugger in this: If so I'd do this locally in the method. You need to be a member in order to leave a comment. Sign up for a new account in our community. It's easy! Already have an account?
Sign in here. Search In. Sign in to follow this Followers 4. Ignore this topic. Prev 1 2 Next Page 1 of 2. Recommended Posts. Soji 1. Posted October 21, Anyone knows any libraries which can do this? The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:.
Latest Post: What function could I use to send values to Arduino uno with node js? Forum Icons: Forum contains no unread posts Forum contains unread posts. Support us by doing your shopping at Amazon. You can of course support us in other ways see Support Us on the left. Content may not be reproduced without explicit permission of the author s. You can contact us through the " Contact Us " form.
Linking to our page s however is very much appreciated. Tweaking 4 All. Search for:. Twitter - Share this page Ad Blocking Detected Please consider disabling your ad blocker for our website. Forums Recent Posts. Software Developmen Delphi, Lazarus, Fr Encryption operates on binary data. You need to decide how to encode the text, and then what encryption algo to use. Only you can decide. It is very important for the after decrypt part to know what kind of data has been encrypted.
It is the same with an image. This question appears to be off-topic because stackoverflow is not a "give me teh codez" site. As pointed above, you are messing encoding and encrypting. It seems that you are unaware of the encoding used in your system.
Your edit suggests that you don't really understand the basic concepts here. I suggest that you need to do some background study to gain a sure understanding of how Unicode is handled in Delphi. Add a comment. Active Oldest Votes. Improve this answer. Hans Hans 2, 10 10 silver badges 32 32 bronze badges. Another interesting question what encryption key and mode of operation are used here? Create MyString, TEncoding.
Wouldn't it be better to specify UTF Using ANSI as you propose is a poor idea. Show 5 more comments. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.
0コメント