Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -49,7 +49,7 @@ final class SHA256 {
}
private static byte[] addPadding(String message) {
byte[] bytes = message.getBytes(StandardCharsets.UTF_8);
byte[] bytes = message.getBytes(StandardCharsets.ISO_8859_1);
bytes = Arrays.copyOf(bytes, bytes.length + 1);
bytes[bytes.length - 1] = (byte) 0x80;

View file

@ -1,9 +1,9 @@
import crypto.sha256
fn main() {
println("${sha256.hexhash('Rosetta code')}")
println('${sha256.hexhash('Rosetta code')}')
mut h := sha256.new()
h.write('Rosetta code'.bytes()) ?
println('${h.checksum().map(it.hex()).join('')}')
h.write('Rosetta code'.bytes())!
println('${h.sum([]u8{}).hex()}')
}