Skip to content

Releases: 52/c32

v0.4.0

10 Feb 22:38
@52 52
aabeb67
Compare
Choose a tag to compare

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

06 Feb 13:05
@52 52
d02d573
Compare
Choose a tag to compare

Changes

  • feat: no_std support by @52 in #12

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

v0.2.1

04 Feb 14:28
@52 52
0ceec96
Compare
Choose a tag to compare

Changes

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

Changelog: v0.2.0...v0.2.1

v0.2.0

04 Feb 13:55
@52 52
9cc79b8
Compare
Choose a tag to compare

Changes

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

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