Exemplo n.º 1
0
 public static string Encrypt(byte[] symmetricKey, PasetoInstance payload, byte[] nonce = null) =>
 EncryptBytes(symmetricKey, Encoding.UTF8.GetBytes(SimpleJson.SerializeObject(payload.ToDictionary())), SimpleJson.SerializeObject(payload.Footer), nonce);
Exemplo n.º 2
0
 public static string Sign(byte[] publicKey, byte[] privateKey, PasetoInstance claims)
 {
     return(SignBytes(publicKey, privateKey, Encoding.UTF8.GetBytes(SimpleJson.SerializeObject(claims.ToDictionary())), SimpleJson.SerializeObject(claims.Footer)));
 }