GetSharedHandle() 정적인 개인적인 메소드

static private GetSharedHandle ( CipherMode cipherMode ) : SafeAlgorithmHandle
cipherMode CipherMode
리턴 Internal.NativeCrypto.SafeAlgorithmHandle
예제 #1
0
        private static ICryptoTransform CreateTransformCore(
            CipherMode cipherMode,
            PaddingMode paddingMode,
            byte[] key,
            byte[] iv,
            int blockSize,
            bool encrypting)
        {
            SafeAlgorithmHandle algorithm = DesBCryptModes.GetSharedHandle(cipherMode);

            BasicSymmetricCipher cipher = new BasicSymmetricCipherBCrypt(algorithm, cipherMode, blockSize, key, false, iv, encrypting);

            return(UniversalCryptoTransform.Create(paddingMode, cipher, encrypting));
        }
예제 #2
0
        private static ILiteSymmetricCipher CreateLiteCipher(
            CipherMode cipherMode,
            PaddingMode paddingMode,
            ReadOnlySpan <byte> key,
            ReadOnlySpan <byte> iv,
            int blockSize,
            int feedbackSize,
            int paddingSize,
            bool encrypting)
        {
            SafeAlgorithmHandle algorithm = DesBCryptModes.GetSharedHandle(cipherMode, feedbackSize);

            return(new BasicSymmetricCipherLiteBCrypt(
                       algorithm,
                       cipherMode,
                       blockSize,
                       paddingSize,
                       key,
                       ownsParentHandle: false,
                       iv,
                       encrypting));
        }