add encrypt/decrypt tests

This commit is contained in:
Denis Mishin 2025-04-24 11:52:34 -04:00
parent c19edb2fdd
commit bce9147f84

View file

@ -20,6 +20,10 @@ func CreateCode(
ad string,
cipher cipher.AEAD,
) (string, error) {
if expires.IsZero() {
return "", fmt.Errorf("validate: zero expiration")
}
v := oauth21proto.Code{
Id: id,
ExpiresAt: timestamppb.New(expires),