base32

Fast open source checksum for small strings

五迷三道 提交于 2019-11-30 12:16:00
问题 I need a quick checksum (as fast as possilbe) for small strings (20-500 chars). I need the source code and that must be small! (about 100 LOC max) If it could generate strings in Base32/64. (or something similar) it would be perfect. Basically the checksums cannot use any "bad" chars.. you know.. the usual (){}[].,;:/+-\| etc Clarifications It could be strong/weak, that really doesn't matter since it is only for behind-the-scenes purposes. It need not contain all the data of the original

Fast open source checksum for small strings

烈酒焚心 提交于 2019-11-30 01:48:12
I need a quick checksum (as fast as possilbe) for small strings (20-500 chars). I need the source code and that must be small! (about 100 LOC max) If it could generate strings in Base32/64. (or something similar) it would be perfect. Basically the checksums cannot use any "bad" chars.. you know.. the usual (){}[].,;:/+-\| etc Clarifications It could be strong/weak, that really doesn't matter since it is only for behind-the-scenes purposes. It need not contain all the data of the original string since I will be only doing comparison with generated checksums, I don't expect any sort of

Encoding a number, C# implementation of z-base-32 or something else?

孤人 提交于 2019-11-29 13:52:32
问题 I need to encode/decode an integer which is up to 9 digits long but most often 7 digits long. I'd like to make it easier to communicate/memorise - it will be communicated by phone, copied & pasted, keyed in from a card/memory/label, hand-written on labels and generally abused! I'm looking to reduce the number of digits (whilst adding a checksum) using a base 32 scheme. I'm most in favour of z-base-32 (over the RFC4648 implementation) because of some of the design goals (e.g. handwriting) and

Encode string to base32 string in Java

*爱你&永不变心* 提交于 2019-11-26 21:33:18
问题 Just like the title says, I am trying to encode a string "test" into base32 string "ORSXG5A=" in Java. All I find when searching online is classes that encodes from string to array with 32bits, but obviously that is not what I want. Sorry for this newbie question. 回答1: Apache commons-codec provides a Base32 class that does just that Base32 base32 = new Base32(); System.out.println(base32.encodeAsString("test".getBytes())); prints ORSXG5A= You can download it here. 回答2: As @Sotirios

Base32 Decoding

谁说胖子不能爱 提交于 2019-11-26 20:08:26
I have a base32 string which I need to convert to a byte array. And I'm having trouble finding a conversion method in the .NET framework. I can find methods for base64 but not for base32. Convert.FromBase64String – something like this for base32 would be perfect. Is there such a method in the framework or do I have to roll my own? CMS Check this FromBase32String implementation for .NET found here . Edit: The above link was dead; you can find an archived copy at archive.org The actual code read: using System; using System.Text; public sealed class Base32 { // the valid chars for the encoding

Base32 Decoding

那年仲夏 提交于 2019-11-26 07:31:23
问题 I have a base32 string which I need to convert to a byte array. And I\'m having trouble finding a conversion method in the .NET framework. I can find methods for base64 but not for base32. Convert.FromBase64String – something like this for base32 would be perfect. Is there such a method in the framework or do I have to roll my own? 回答1: Check this FromBase32String implementation for .NET found here. Edit: The above link was dead; you can find an archived copy at archive.org The actual code