Skip to content

Releases: 52/c32

v0.6.1

Choose a tag to compare

@52 52 released this 30 Apr 15:08
11c0d1f

Changes

  • feat(error): add Error::InvalidDataSize variant by @52 in #30

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@52 52 released this 30 Apr 10:07
7342c05

Changes

  • feat(core): redesign Buffer API by @52 in #28

Full Changelog: v0.5.3...v0.6.0

v0.5.3

Choose a tag to compare

@52 52 released this 28 Apr 13:20
072a42f

What's Changed

  • refactor(core): enhance error message by @52 in #26

Full Changelog: v0.5.2...v0.5.3

v0.5.2

Choose a tag to compare

@52 52 released this 28 Apr 10:02
1a00d14

Changes

  • perf(bench): added encode_const & decode_const targets by @52 in #23
  • refactor(core): remove upfront validation loops by @52 in #24

Full Changelog: v0.5.1...v0.5.2

v0.5.1

Choose a tag to compare

@52 52 released this 25 Apr 08:19
5da3f53

Changes

  • fix(c32): symlink README.md by @52 in #21

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@52 52 released this 25 Apr 08:09
eddf7c3

Changes

  • feat: migrate to workspace by @52 in #19

Full Changelog: v0.4.0...v0.5.0

Features

The new Buffer type can be used to encode and decode Crockford Base32 in constant contexts:

use c32::Buffer;

const INPUT: [u8; 3] = [42, 42, 42];
const ENCODED: Buffer<5> = Buffer::encode(&INPUT);
assert_eq!(ENCODED.as_str(), "2MAHA");

const DECODED: Buffer<5> = Buffer::decode(b"2MAHA");
assert_eq!(DECODED.as_bytes(), [42, 42, 42]);

v0.4.0

Choose a tag to compare

@52 52 released this 10 Feb 22:38
aabeb67

Changes

  • feat: added checksum verification by @52 in #17

Full Changelog: v0.3.0...v0.4.0

Features

The new check feature provides methods for encoding data with SHA256-based checksum verification.

std or alloc

// encoding...
let bytes = b"usque ad finem";
let encoded = c32::encode_check(bytes, 22)?;
assert_eq!(encoded, "P7AWVHENJJ0RB441K6JVK5DNJ7J3V5");
// decoding...
let encoded = "P7AWVHENJJ0RB441K6JVK5DNJ7J3V5";
let (version, decoded) = c32::decode_check(encoded)?;
assert_eq!(decoded, b"usque ad finem");
assert_eq!(version, 22);

... or with #![no_std]

// encoding...
let bytes = b"usque ad finem";
let mut buffer = [0; 32];

let written = c32::encode_check_into(bytes, 22, &mut buffer)?;
let encoded = &buffer[..written];
assert_eq!(encoded, b"P7AWVHENJJ0RB441K6JVK5DNJ7J3V5");
// decoding...
let encoded = b"P7AWVHENJJ0RB441K6JVK5DNJ7J3V5";
let mut buffer = [0; 32];

let (version, written) = c32::decode_check_into(encoded, &mut buffer)?;
let decoded = &buffer[..written];
assert_eq!(decoded, b"usque ad finem");
assert_eq!(version, 22);

v0.3.0

Choose a tag to compare

@52 52 released this 06 Feb 13:05
d02d573

Changes

  • feat: no_std support by @52 in #12

Full Changelog: v0.2.1...v0.3.0

v0.2.1

Choose a tag to compare

@52 52 released this 04 Feb 14:28
0ceec96

Changes

  • chore(crate): exclude benches/ & samples/ by @52 in #10

Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@52 52 released this 04 Feb 13:55
9cc79b8

Changes

  • feat: added release workflow by @52 in #6

Full Changelog: https://github.com/52/c32/commits/v0.2.0