mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
There is a new protobuf library (and corresponding code generator) for Go: google.golang.org/protobuf. It is fairly compatible with the previous v1 API (github.com/golang/protobuf), but there are some changes. This patch adjusts the code and generated files to the new API. The on-wire/on-disk format remains unchanged so this should be transparent to the users.
30 lines
403 B
Protocol Buffer
30 lines
403 B
Protocol Buffer
|
|
syntax = "proto3";
|
|
|
|
package userdb;
|
|
option go_package = "blitiri.com.ar/go/chasquid/internal/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;
|
|
}
|