private readonly bool _encrypting;
private static readonly CngProperty s_ECBMode =
- new CngProperty(Interop.NCrypt.NCRYPT_CHAINING_MODE_PROPERTY, Encoding.UTF8.GetBytes(Interop.BCrypt.BCRYPT_CHAIN_MODE_ECB + "\0"), CngPropertyOptions.None);
+ new CngProperty(Interop.NCrypt.NCRYPT_CHAINING_MODE_PROPERTY, Encoding.Unicode.GetBytes(Interop.BCrypt.BCRYPT_CHAIN_MODE_ECB + "\0"), CngPropertyOptions.None);
private static readonly CngProperty s_CBCMode =
- new CngProperty(Interop.NCrypt.NCRYPT_CHAINING_MODE_PROPERTY, Encoding.UTF8.GetBytes(Interop.BCrypt.BCRYPT_CHAIN_MODE_CBC + "\0"), CngPropertyOptions.None);
+ new CngProperty(Interop.NCrypt.NCRYPT_CHAINING_MODE_PROPERTY, Encoding.Unicode.GetBytes(Interop.BCrypt.BCRYPT_CHAIN_MODE_CBC + "\0"), CngPropertyOptions.None);
}
}
private static readonly CngAlgorithm s_cngAlgorithm = new CngAlgorithm("AES");
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31092")]
[OuterLoop(/* Creates/Deletes a persisted key, limit exposure to key leaking */)]
[ConditionalTheory(nameof(SupportsPersistedSymmetricKeys))]
// AES128-ECB-NoPadding 2 blocks.
keyName => new AesCng(keyName));
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31092")]
[OuterLoop(/* Creates/Deletes a persisted key, limit exposure to key leaking */)]
[ConditionalFact(nameof(SupportsPersistedSymmetricKeys))]
public static void SetKey_DetachesFromPersistedKey()
}
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31092")]
[OuterLoop(/* Creates/Deletes a persisted key, limit exposure to key leaking */)]
[ConditionalFact(nameof(SupportsPersistedSymmetricKeys), nameof(IsAdministrator))]
public static void VerifyMachineKey()
private static readonly CngAlgorithm s_cngAlgorithm = new CngAlgorithm("3DES");
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31092")]
[OuterLoop(/* Creates/Deletes a persisted key, limit exposure to key leaking */)]
[ConditionalTheory(nameof(SupportsPersistedSymmetricKeys))]
// 3DES192-ECB-NoPadding 2 blocks.
keyName => new TripleDESCng(keyName));
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31092")]
[OuterLoop(/* Creates/Deletes a persisted key, limit exposure to key leaking */)]
[ConditionalFact(nameof(SupportsPersistedSymmetricKeys))]
public static void SetKey_DetachesFromPersistedKey()
}
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/31092")]
[OuterLoop(/* Creates/Deletes a persisted key, limit exposure to key leaking */)]
[ConditionalFact(nameof(SupportsPersistedSymmetricKeys), nameof(IsAdministrator))]
public static void VerifyMachineKey()