SymmetricAlgorithm.TryDecryptCbc 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 패딩 모드에서 CBC 모드를 사용하여 데이터를 지정된 버퍼로 암호 해독하려고 시도합니다.
public bool TryDecryptCbc (ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> iv, Span<byte> destination, out int bytesWritten, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7);
member this.TryDecryptCbc : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> * int * System.Security.Cryptography.PaddingMode -> bool
Public Function TryDecryptCbc (ciphertext As ReadOnlySpan(Of Byte), iv As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.PKCS7) As Boolean
매개 변수
- ciphertext
- ReadOnlySpan<Byte>
해독할 데이터입니다.
- iv
- ReadOnlySpan<Byte>
초기화 벡터입니다.
- bytesWritten
- Int32
이 메서드가 반환되면 .에 기록 destination
된 총 바이트 수를 포함합니다.
- paddingMode
- PaddingMode
암호 텍스트를 생성하고 암호 해독 중에 제거하는 데 사용되는 패딩 모드입니다.
반환
true
if destination
was large enough to receive the decrypted data; otherwise, false
.
예외
paddingMode
가 유효한 패딩 모드가 아닌 경우
iv
가 잘못된 길이입니다. 호출자는 정확히 BlockSize 길이가 바이트(BlockSize/8
)로 변환된 초기화 벡터를 전달해야 합니다.
암호 텍스트를 성공적으로 해독할 수 없습니다.
설명
이 메서드의 동작은 .에 의해 TryDecryptCbcCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)정의됩니다.