1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-03-07 02:35:57 +00:00

userdb: Use protocol buffers instead of our custom format

Protocol buffers are a more portable, practical and safe format for the user
database.
This commit is contained in:
Alberto Bertogli
2016-09-18 01:12:41 +01:00
parent 5c6fb934fe
commit 394067bbd3
12 changed files with 384 additions and 316 deletions

View File

@@ -0,0 +1,28 @@
syntax = "proto3";
package userdb;
message ProtoDB {
map<string, Password> users = 1;
}
message Password {
oneof scheme {
Scrypt scrypt = 2;
Plain plain = 3;
}
}
message Scrypt {
uint64 logN = 1;
int32 r = 2;
int32 p = 3;
int32 keyLen = 4;
bytes salt = 5;
bytes encrypted = 6;
}
message Plain {
bytes password = 1;
}