Added the random crypto module with its default implementation, implemented the Ed25519 keys generation function
This commit is contained in:
parent
1216dc2282
commit
ff60995aaa
3 changed files with 44 additions and 26 deletions
15
src/crypto/random.zig
Normal file
15
src/crypto/random.zig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
pub const Implementation = struct {
|
||||
generate: *const fn (out: []u8) void,
|
||||
};
|
||||
|
||||
// TODO
|
||||
pub const defaultImplementation = struct {
|
||||
|
||||
pub fn generate(out: []u8) void {
|
||||
// WARNING This is not secure at all, use only for testing purposes
|
||||
for(out) |*byte| {
|
||||
byte *= undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue