public void WrapUnwrapKey() { var alg = new AesKeyWrapManagement(256); var encrypted = alg.WrapKey(_secret, _key); var decrypted = alg.UnwrapKey(encrypted, _key); Assert.Equal(decrypted, _secret); }
public void WrapUnwrapKey_NotEqual() { var key = new HMACSHA256(Utils.Random(256)); var alg = new AesKeyWrapManagement(256); var encrypted = alg.WrapKey(_secret, _key); var decrypted = alg.UnwrapKey(encrypted, key); Assert.NotEqual(decrypted, _secret); }