Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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()}')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue