Documentation ¶
Overview ¶
Package crock32 implements Douglas Crockford's Base32 encoding.
Crock32 is useful for "expressing numbers in a form that can be conveniently and accurately transmitted between humans and computer systems." See http://www.crockford.com/wrmg/base32.html for details. Note: crock32 differs from Crockford in its use of lower-case letters when encoding (decode works for both cases). To change, use: crock32.SetDigits("0123456789ABCDEFGHJKMNPQRSTVWXYZ")
Example:
i, _ := crock32.Decode("a1j3") s := crock32.Encode(i) fmt.Println(s)
Copyright 2018 Richard Lehane. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this img except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode converts a string matching Douglas Crockford's character set (case insensitive) into an unsigned 64-bit integer.