mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
First 0.7 update, removing all deprecated features.
This commit is contained in:
committed by
Christoffer Lerno
parent
cff6697818
commit
2a895ec7be
@@ -1,4 +1,4 @@
|
||||
module std::hash::hmac(<HashAlg, HASH_BYTES, BLOCK_BYTES>);
|
||||
module std::hash::hmac{HashAlg, HASH_BYTES, BLOCK_BYTES};
|
||||
import std::crypto;
|
||||
|
||||
struct Hmac
|
||||
|
||||
@@ -13,9 +13,9 @@ struct Md5
|
||||
uint[16] block;
|
||||
}
|
||||
|
||||
def HmacMd5 = Hmac(<Md5, HASH_BYTES, BLOCK_BYTES>);
|
||||
def hmac = hmac::hash(<Md5, HASH_BYTES, BLOCK_BYTES>);
|
||||
def pbkdf2 = hmac::pbkdf2(<Md5, HASH_BYTES, BLOCK_BYTES>);
|
||||
def HmacMd5 = Hmac{Md5, HASH_BYTES, BLOCK_BYTES};
|
||||
def hmac = hmac::hash{Md5, HASH_BYTES, BLOCK_BYTES};
|
||||
def pbkdf2 = hmac::pbkdf2{Md5, HASH_BYTES, BLOCK_BYTES};
|
||||
|
||||
fn char[HASH_BYTES] hash(char[] data)
|
||||
{
|
||||
|
||||
@@ -18,9 +18,9 @@ struct Sha1
|
||||
char[BLOCK_BYTES] buffer;
|
||||
}
|
||||
|
||||
def HmacSha1 = Hmac(<Sha1, HASH_BYTES, BLOCK_BYTES>);
|
||||
def hmac = hmac::hash(<Sha1, HASH_BYTES, BLOCK_BYTES>);
|
||||
def pbkdf2 = hmac::pbkdf2(<Sha1, HASH_BYTES, BLOCK_BYTES>);
|
||||
def HmacSha1 = Hmac{Sha1, HASH_BYTES, BLOCK_BYTES};
|
||||
def hmac = hmac::hash{Sha1, HASH_BYTES, BLOCK_BYTES};
|
||||
def pbkdf2 = hmac::pbkdf2{Sha1, HASH_BYTES, BLOCK_BYTES};
|
||||
|
||||
fn char[HASH_BYTES] hash(char[] data)
|
||||
{
|
||||
|
||||
@@ -34,9 +34,9 @@ struct Sha256
|
||||
char[BLOCK_SIZE] buffer;
|
||||
}
|
||||
|
||||
def HmacSha256 = Hmac(<Sha256, HASH_SIZE, BLOCK_SIZE>);
|
||||
def hmac = hmac::hash(<Sha256, HASH_SIZE, BLOCK_SIZE>);
|
||||
def pbkdf2 = hmac::pbkdf2(<Sha256, HASH_SIZE, BLOCK_SIZE>);
|
||||
def HmacSha256 = Hmac{Sha256, HASH_SIZE, BLOCK_SIZE};
|
||||
def hmac = hmac::hash{Sha256, HASH_SIZE, BLOCK_SIZE};
|
||||
def pbkdf2 = hmac::pbkdf2{Sha256, HASH_SIZE, BLOCK_SIZE};
|
||||
|
||||
fn char[HASH_SIZE] hash(char[] data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user