|
public static byte[] Encrypt(byte[] payload, byte[] macBytes, byte[] symmetricKey, byte[] additionalData) => |
|
SecretAead.Encrypt(payload, macBytes, symmetricKey, additionalData, useXChaCha: true); |
|
|
|
public static byte[] Decrypt(byte[] payload, byte[] nonceBytes, byte[] symmetricKey, byte[] additionalData) => |
|
SecretAead.Decrypt(payload, nonceBytes, symmetricKey, additionalData, useXChaCha: true); |
See https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md
Right now, byte arrays are accepted by this API. There's no mechanism to prevent a user from using a v2 public key as a v2 local key.
Paseto.Net/Paseto/Authentication/Algorithm.cs
Lines 8 to 12 in 452a4b3
See https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md
Right now, byte arrays are accepted by this API. There's no mechanism to prevent a user from using a v2 public key as a v2 local key.