Skip to content

Commit

Permalink
add argon2 kdf (#9756)
Browse files Browse the repository at this point in the history
  • Loading branch information
x13a committed Nov 15, 2021
1 parent 09c17ac commit c61fbe7
Show file tree
Hide file tree
Showing 3 changed files with 957 additions and 7 deletions.
10 changes: 6 additions & 4 deletions lib/std/crypto.zig
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,17 @@ pub const pwhash = struct {
phc,
crypt,
};
pub const KdfError = errors.Error || std.mem.Allocator.Error;
pub const HasherError = KdfError || phc_format.Error;
pub const Error = HasherError || error{AllocatorRequired};

pub const phc_format = @import("crypto/phc_encoding.zig");
pub const Error = HasherError || error{AllocatorRequired};
pub const HasherError = KdfError || phc_format.Error;
pub const KdfError = errors.Error || std.mem.Allocator.Error || std.Thread.SpawnError;

pub const argon2 = @import("crypto/argon2.zig");
pub const bcrypt = @import("crypto/bcrypt.zig");
pub const scrypt = @import("crypto/scrypt.zig");
pub const pbkdf2 = @import("crypto/pbkdf2.zig").pbkdf2;

pub const phc_format = @import("crypto/phc_encoding.zig");
};

/// Digital signature functions.
Expand Down

0 comments on commit c61fbe7

Please sign in to comment.