Jump to content

SHA-256: Difference between revisions

→‎{{header|Perl 6}}: adding an exception for non-ASCII strings
(Added BBC BASIC)
(→‎{{header|Perl 6}}: adding an exception for non-ASCII strings)
Line 344:
multi sha256(Str $str where all($str.ords) < 128) {
sha256 $str.encode: 'ascii'
}
multi sha256(Str $str where any($str.ords) > 127) {
die "not trying to guess encoding"
}
multi sha256(Buf $data) {
1,934

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.