Module crypto.sha256 stdlib

crypto.sha256
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
2
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

Imported by

This section is empty.

Aliases

This section is empty.

Constants

#constant size

size       = 32

#constant size224

size224    = 28

#constant block_size

block_size = 64

Sum types

This section is empty.

Functions

#fn hexhash

fn hexhash(s string) string

hexhash returns a hexadecimal SHA256 hash sum string of s.

Example:

assert sha256.hexhash('V') == 'de5a6f78116eca62d7fc5ce159d23ae6b889b365a1739ad2cf36f925a140d0cc'

#fn hexhash_224

fn hexhash_224(s string) string

hexhash_224 returns a hexadecimal SHA224 hash sum string of s.

#fn new

fn new() &Digest

new returns a new Digest (implementing hash.Hash) computing the SHA256 checksum.

#fn new224

fn new224() &Digest

new224 returns a new Digest (implementing hash.Hash) computing the SHA224 checksum.

#fn sum

fn sum(data []u8) []u8

sum returns the SHA256 checksum of the bytes in data.

Example:

assert sha256.sum('V'.bytes()).len > 0 == true

#fn sum224

fn sum224(data []u8) []u8

sum224 returns the SHA224 checksum of the data.

#fn sum256

fn sum256(data []u8) []u8

sum256 returns the SHA256 checksum of the data.

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.